[master] cbb2f5d Initialize bo->vfc along with the rest of the busyobj so panics work. (slink's pointer test for bo->vfc is impotent because its bo->vfc[1])
Poul-Henning Kamp
phk at FreeBSD.org
Mon Dec 1 12:19:59 CET 2014
commit cbb2f5d6ec722280d8f2e164c9cbe54f19814857
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Dec 1 11:03:05 2014 +0000
Initialize bo->vfc along with the rest of the busyobj so panics
work. (slink's pointer test for bo->vfc is impotent because its bo->vfc[1])
diff --git a/bin/varnishd/cache/cache_busyobj.c b/bin/varnishd/cache/cache_busyobj.c
index 16c67f2..a803942 100644
--- a/bin/varnishd/cache/cache_busyobj.c
+++ b/bin/varnishd/cache/cache_busyobj.c
@@ -39,6 +39,7 @@
#include "cache.h"
#include "hash/hash_slinger.h"
+#include "cache/cache_filter.h"
static struct mempool *vbopool;
@@ -156,6 +157,8 @@ VBO_GetBusyObj(struct worker *wrk, const struct req *req)
VRTPRIV_init(bo->privs);
+ VFP_Setup(bo->vfc);
+
return (bo);
}
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 08f253f..c44992b 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -389,7 +389,6 @@ vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo)
} else
do_ims = 0;
- VFP_Setup(bo->vfc);
bo->vfc->bo = bo;
bo->vfc->oc = bo->fetch_objcore;
bo->vfc->wrk = bo->wrk;
@@ -776,7 +775,6 @@ vbf_stp_error(struct worker *wrk, struct busyobj *bo)
assert(wrk->handling == VCL_RET_DELIVER);
- VFP_Setup(bo->vfc);
bo->vfc->bo = bo;
bo->vfc->wrk = bo->wrk;
bo->vfc->oc = bo->fetch_objcore;
diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c
index 295dfe5..d82e43f 100644
--- a/bin/varnishd/cache/cache_panic.c
+++ b/bin/varnishd/cache/cache_panic.c
@@ -324,8 +324,7 @@ pan_busyobj(const struct busyobj *bo)
pan_ws(bo->ws, 4);
VSB_printf(pan_vsp, " refcnt = %u\n", bo->refcount);
VSB_printf(pan_vsp, " retries = %d\n", bo->retries);
- if (bo->vfc != NULL)
- VSB_printf(pan_vsp, " failed = %d\n", bo->vfc->failed);
+ VSB_printf(pan_vsp, " failed = %d\n", bo->vfc->failed);
VSB_printf(pan_vsp, " state = %d\n", (int)bo->state);
#define BO_FLAG(l, r, w, d) if(bo->l) VSB_printf(pan_vsp, " is_" #l "\n");
#include "tbl/bo_flags.h"
More information about the varnish-commit
mailing list