r4719 - trunk/varnish-cache/bin/varnishd
phk at varnish-cache.org
phk at varnish-cache.org
Sat Apr 24 09:44:57 CEST 2010
Author: phk
Date: 2010-04-24 09:44:57 +0200 (Sat, 24 Apr 2010)
New Revision: 4719
Modified:
trunk/varnish-cache/bin/varnishd/hash_critbit.c
Log:
Close a race between hcb_insert() and hcb_delete()
Hit by: dormando
Modified: trunk/varnish-cache/bin/varnishd/hash_critbit.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/hash_critbit.c 2010-04-23 21:09:29 UTC (rev 4718)
+++ trunk/varnish-cache/bin/varnishd/hash_critbit.c 2010-04-24 07:44:57 UTC (rev 4719)
@@ -212,6 +212,12 @@
pp = *p;
}
+ if (pp == 0) {
+ /* We raced hcb_delete and got a NULL pointer */
+ assert(!has_lock);
+ return (NULL);
+ }
+
assert(hcb_is_node(pp));
/* We found a node, does it match ? */
More information about the varnish-commit
mailing list