[master] 17d7c4f When we see a segment overrun, re-check if VSM still valid

Nils Goroll nils.goroll at uplex.de
Sun Oct 15 12:32:11 UTC 2017


commit 17d7c4f387c5f7dc715d62bd87b770ee6b9319a4
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Sun Oct 15 14:27:18 2017 +0200

    When we see a segment overrun, re-check if VSM still valid
    
    Trying to tackle #2460

diff --git a/lib/libvarnishapi/vsl_cursor.c b/lib/libvarnishapi/vsl_cursor.c
index 0424922..f75e172 100644
--- a/lib/libvarnishapi/vsl_cursor.c
+++ b/lib/libvarnishapi/vsl_cursor.c
@@ -128,8 +128,12 @@ vslc_vsm_next(const struct VSL_cursor *cursor)
 
 	while (1) {
 		i = vslc_vsm_check(&c->cursor, &c->next);
-		if (i <= 0)
-			return (-3); /* Overrun */
+		if (i <= 0) {
+			if (VSM_StillValid(c->vsm, &c->vf) != VSM_valid)
+				return (-2); /* VSL abandoned */
+			else
+				return (-3); /* Overrun */
+		}
 
 		t = *(volatile const uint32_t *)c->next.ptr;
 		AN(t);


More information about the varnish-commit mailing list