[4.0] 83da2ec Ensure bo is set should we panic in VBO_DerefBusyObj

Lasse Karstensen lkarsten at varnish-software.com
Thu Jan 15 16:35:42 CET 2015


commit 83da2ecfdc28078033baf36e7127d34177ce58fb
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Mon Nov 17 12:46:25 2014 +0000

    Ensure bo is set should we panic in VBO_DerefBusyObj

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index d24bfff..9277e5c 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -932,6 +932,6 @@ VBF_Fetch(struct worker *wrk, struct req *req, struct objcore *oc,
 		}
 	}
 	VSLb_ts_req(req, "Fetch", W_TIM_real(wrk));
-	THR_SetBusyobj(NULL);
 	VBO_DerefBusyObj(wrk, &bo);
+	THR_SetBusyobj(NULL);
 }
diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index 073e9fb..9c60b0f 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -628,6 +628,7 @@ cnt_pipe(struct worker *wrk, struct req *req)
 	assert(WRW_IsReleased(wrk));
 	http_Teardown(bo->bereq);
 	VBO_DerefBusyObj(wrk, &bo);
+	THR_SetBusyobj(NULL);
 	return (REQ_FSM_DONE);
 }
 



More information about the varnish-commit mailing list