[master] f5ce551 be paranoid when marking workspace overflows

Nils Goroll nils.goroll at uplex.de
Thu Apr 19 07:53:09 UTC 2018

commit f5ce55168a2d31eb24e7ea2a12036d1dc489235c
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Thu Apr 19 09:47:20 2018 +0200

    be paranoid when marking workspace overflows
    issue a membar to ensure that the overflow marker is written
    before a failing WS allocation returns and is thus visible from
    a different context.
    pan_ic() already has an implicit membar via the mutex lock.
    Ref #2645

diff --git a/bin/varnishd/cache/cache_ws.c b/bin/varnishd/cache/cache_ws.c
index 3ec5ec0..a6038de 100644
--- a/bin/varnishd/cache/cache_ws.c
+++ b/bin/varnishd/cache/cache_ws.c
@@ -31,6 +31,7 @@
 #include "config.h"
 #include "cache_varnishd.h"
+#include "vmb.h"
 #include <stdio.h>
@@ -115,6 +116,7 @@ WS_MarkOverflow(struct ws *ws)
 	ws->id[0] &= ~0x20;		// cheesy toupper()
+	VWMB();
 static void

More information about the varnish-commit mailing list