From b2286ce75398e55634decdae55df953094d6c199 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 10 Feb 2014 18:20:30 -0800 Subject: [PATCH] swapcache - Fix token leak * vmobjlst tokens can build up in the swapcache thread due to a label in the wrong place. This eventually panics the box. Reported-by: ftigeot --- sys/vm/vm_swapcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_swapcache.c b/sys/vm/vm_swapcache.c index 138ecaba89..3c6669280d 100644 --- a/sys/vm/vm_swapcache.c +++ b/sys/vm/vm_swapcache.c @@ -688,12 +688,12 @@ vm_swapcache_cleaning(vm_object_t marker, int *swindexp) count = vm_swapcache_maxlaunder; scount = vm_swapcache_maxscan; -outerloop: /* * Look for vnode objects */ lwkt_gettoken(&vmobj_tokens[*swindexp]); +outerloop: while ((object = TAILQ_NEXT(marker, object_list)) != NULL) { /* * We have to skip markers. We cannot hold/drop marker -- 2.41.0