r5532 - trunk/varnish-cache/bin/varnishd

phk at varnish-cache.org phk at varnish-cache.org
Wed Nov 10 21:11:40 CET 2010


Author: phk
Date: 2010-11-10 21:11:40 +0100 (Wed, 10 Nov 2010)
New Revision: 5532

Modified:
   trunk/varnish-cache/bin/varnishd/cache_hash.c
Log:
"new-purge" cannot and should not touch busy objects, as they are not
subject to refcounting.

Fixes: #812



Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_hash.c	2010-11-09 12:16:30 UTC (rev 5531)
+++ trunk/varnish-cache/bin/varnishd/cache_hash.c	2010-11-10 20:11:40 UTC (rev 5532)
@@ -510,6 +510,15 @@
 	VTAILQ_FOREACH(oc, &oh->objcs, list) {
 		CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
 		assert(oc->objhead == oh);
+		if (oc->flags & OC_F_BUSY) {
+			/*
+			 * We cannot purge busy objects here, because their
+			 * owners have special rights to them, and may nuke
+			 * them without concern for the refcount, which by
+			 * definition always must be one, so they don't check.
+			 */
+			continue;
+		}
 
 		if (oc->flags & OC_F_PERSISTENT)
 			SMP_Fixup(sp, oh, oc);




More information about the varnish-commit mailing list