Commit f4b2cb9c authored by Pål Hermunn Johansen's avatar Pål Hermunn Johansen Committed by Martin Blix Grydeland

Remove assert in shared memory

Even though the shared memory log should always have only one writer,
the varnish process, this is not enforced by the kernel through access
rights. For this reason, the line

     assert(b->vsc->vcls > 0);

could crash Varnish if a process decided to write to the shared memory
log. Now this bad behavior will just affect other readers of the
shared memory log, and not the varnish process itself.
parent f4539dd2
......@@ -138,7 +138,6 @@ VBE_DropRefVcl(struct backend *b)
ASSERT_CLI();
Lck_Lock(&b->mtx);
assert(b->vsc->vcls > 0);
b->vsc->vcls--;
VBE_DropRefLocked(b, NULL);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment