• Andrew Morton's avatar
    [PATCH] dm: 'wait for event' race · aa6d85aa
    Andrew Morton authored
    From: Joe Thornber <thornber@sistina.com>
    
    There was a race associated with the 'wait for a significant event'
    functionality.
    
    Basically userland could read the status table, then wait for another
    event, but the event it was waiting for could have occurred in the gap
    between reading and waiting.
    
    To solve this we assign identifiers to events, in order to successfully
    wait for an event both userland and the kernel driver must be in agreement
    about what the last event identifier was.  If they don't agree the wait
    call will return immediately, allowing userland to re-read the status and
    see what it missed.
    
    The new ioctl interface will use this properly.
    aa6d85aa
dm-table.c 15.9 KB