Created
January 16, 2016 14:37
-
-
Save lkarsten/18d35c409d2227bd7d74 to your computer and use it in GitHub Desktop.
Revisions
-
Lasse Karstensen created this gist
Jan 16, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ From a1d9d3122e780bb7d4c384eb668398089ced5df3 Mon Sep 17 00:00:00 2001 From: Lasse Karstensen <[email protected]> Date: Sat, 16 Jan 2016 15:32:16 +0100 Subject: [PATCH] Handle missing waiting list gracefully. In 5c8268062bf06a2700dd27331c29c48d650c9197 the checks are relaxed, but this commit (or part of) was not brought into 4.1. --- bin/varnishd/cache/cache_hash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c index 18b9628..27a1f24 100644 --- a/bin/varnishd/cache/cache_hash.c +++ b/bin/varnishd/cache/cache_hash.c @@ -522,8 +522,10 @@ hsh_rush(struct worker *wrk, struct objhead *oh) CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(oh, OBJHEAD_MAGIC); Lck_AssertHeld(&oh->mtx); + if (oh->waitinglist == NULL) + return; wl = oh->waitinglist; - CHECK_OBJ_NOTNULL(wl, WAITINGLIST_MAGIC); + CHECK_OBJ(wl, WAITINGLIST_MAGIC); for (u = 0; u < cache_param->rush_exponent; u++) { req = VTAILQ_FIRST(&wl->list); if (req == NULL) -- 1.9.5 (Apple Git-50.3)