• Sean Hefty's avatar
    IB/cm: Flush workqueue when removing device · 84ba284c
    Sean Hefty authored
    When a CM MAD is received, it is queued to a CM workqueue for
    processing.  The queued work item references the port and device on
    which the MAD was received.  If that device is removed from the system
    before the work item can execute, the work item will reference freed
    memory.
    
    To fix this, flush the workqueue after unregistering to receive MAD,
    and before the device is be freed.
    Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
    Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
    84ba284c
cm.c 106 KB