• Borislav Petkov's avatar
    EDAC: Fix workqueue-related crashes · bb31b312
    Borislav Petkov authored
    00740c58 changed edac_core to
    un-/register a workqueue item only if a lowlevel driver supplies a
    polling routine. Normally, when we remove a polling low-level driver, we
    go and cancel all the queued work. However, the workqueue unreg happens
    based on the ->op_state setting, and edac_mc_del_mc() sets this to
    OP_OFFLINE _before_ we cancel the work item, leading to NULL ptr oops on
    the workqueue list.
    
    Fix it by putting the unreg stuff in proper order.
    
    Cc: <stable@kernel.org> #36.x
    Reported-and-tested-by: default avatarTobias Karnat <tobias.karnat@googlemail.com>
    LKML-Reference: <1291201307.3029.21.camel@Tobias-Karnat>
    Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
    bb31b312
edac_mc.c 23.5 KB