[master] 9f52d60 Insist that VCL events are only sent from CLI thread

Poul-Henning Kamp phk at FreeBSD.org
Mon Sep 5 23:14:08 CEST 2016


commit 9f52d6033262c2647f7ec719c83fec1a63402fd0
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Sep 5 21:13:07 2016 +0000

    Insist that VCL events are only sent from CLI thread

diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c
index 5afc65a..627b8c9 100644
--- a/bin/varnishd/cache/cache_vcl.c
+++ b/bin/varnishd/cache/cache_vcl.c
@@ -518,6 +518,7 @@ static int
 vcl_setup_event(VRT_CTX, enum vcl_event_e ev)
 {
 
+	ASSERT_CLI();
 	CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
 	CHECK_OBJ_NOTNULL(ctx->vcl, VCL_MAGIC);
 	CHECK_OBJ_NOTNULL(ctx->vcl->conf, VCL_CONF_MAGIC);
@@ -533,6 +534,7 @@ static void
 vcl_failsafe_event(VRT_CTX, enum vcl_event_e ev)
 {
 
+	ASSERT_CLI();
 	CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
 	CHECK_OBJ_NOTNULL(ctx->vcl, VCL_MAGIC);
 	CHECK_OBJ_NOTNULL(ctx->vcl->conf, VCL_CONF_MAGIC);



More information about the varnish-commit mailing list