[4.1] 6831bdd Check against the sampled oc->ban rather than the current oc->ban
Martin Blix Grydeland
martin at varnish-software.com
Thu Mar 3 10:52:53 CET 2016
commit 6831bdd5921cd606d3892cbe8ce7cc37dbfc4e53
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 deb4255..bb06490 100644
--- a/bin/varnishd/cache/cache_ban.c
+++ b/bin/varnishd/cache/cache_ban.c
@@ -556,7 +556,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