• Adrian Hunter's avatar
    UBIFS: allow for racing between GC and TNC · 601c0bc4
    Adrian Hunter authored
    The TNC mutex is unlocked prematurely when reading leaf nodes
    with non-hashed keys.  This is unsafe because the node may be
    moved by garbage collection and the eraseblock unmapped, although
    that has never actually happened during stress testing.
    
    This patch fixes the flaw by detecting the race and retrying with
    the TNC mutex locked.
    Signed-off-by: default avatarAdrian Hunter <ext-adrian.hunter@nokia.com>
    601c0bc4
tnc.c 77.3 KB