• Andrew Morton's avatar
    [PATCH] Add barriers to avoid race in mempool_alloc/free · 66d1bbed
    Andrew Morton authored
    From: Chris Mason <mason@suse.com>
    
    mempool_alloc() and mempool_free() check pool->curr_nr without any locks
    held.  This can lead to skipping a wakeup when there are people waiting,
    and sleeping when there are free elements in the pool.
    
    I can't trigger this reliably, but sooner or later someone on ppc is
    probably going to hit it.
    66d1bbed
mempool.c 7.75 KB