• Nils Goroll's avatar
    Simplify vsl segment management, fixing spurious vsl overruns · 35cf7813
    Nils Goroll authored
    vsl sequence and segment updates didn't happen atomically, so
    vslc_vsm_check could report spurious overruns.
    
    Replace sequence and segment index with a counter (segment_n), which
    always increments (with overflow after UINT_MAX). The actual segment
    index will be segment_n % VSL_SEGMENTS. Overrun detection by
    calculation of the difference between two segment numbers becomes
    simple and safe because we only ever access/update a single integer.
    
    Update the shared memory log head.
    
    (struct VSLC_ptr).priv is now the the equivalent of segment_n from the
    reader side. It gets initialized once and is maintained independently.
    
    Patch prepared in collaboration with Martin Blix Grydeland
    <martin@varnish-software.com>
    
    Fixes: #1747
    35cf7813
Name
Last commit
Last update
bin Loading commit data...
doc Loading commit data...
etc Loading commit data...
include Loading commit data...
lib Loading commit data...
m4 Loading commit data...
man Loading commit data...
redhat Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
Makefile.inc.phk Loading commit data...
Makefile.phk Loading commit data...
README Loading commit data...
autogen.des Loading commit data...
autogen.sh Loading commit data...
config.phk Loading commit data...
configure.ac Loading commit data...
flint.lnt Loading commit data...
varnish.m4 Loading commit data...
varnishapi-uninstalled.pc.in Loading commit data...
varnishapi.pc.in Loading commit data...