[master] d1b0f52 Check against the sampled oc->ban rather than the current oc->ban
Martin Blix Grydeland
martin at varnish-software.com
Thu Mar 3 10:49:43 CET 2016
commit d1b0f52ed29efe1c4f60c474bd0ef89078c637c1
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Wed Mar 2 15:05:27 2016 +0100
Check against the sampled oc->ban rather than the current oc->ban
Without this we could ban an object erranously if the ban lurker has
moved the OC in the ban list while we were evaluating.
diff --git a/bin/varnishd/cache/cache_ban.c b/bin/varnishd/cache/cache_ban.c
index fb4a5a4..78504bb 100644
--- a/bin/varnishd/cache/cache_ban.c
+++ b/bin/varnishd/cache/cache_ban.c
@@ -577,7 +577,7 @@ BAN_CheckObject(struct worker *wrk, struct objcore *oc, struct req *req)
oc->ban->refcount--;
VTAILQ_REMOVE(&oc->ban->objcore, oc, ban_list);
- if (b == oc->ban) {
+ if (b == bn) {
/* not banned */
VTAILQ_INSERT_TAIL(&b0->objcore, oc, ban_list);
b0->refcount++;
More information about the varnish-commit
mailing list