]> git.baikalelectronics.ru Git - kernel.git/commit
IB/cm: Flush workqueue when removing device
authorSean Hefty <sean.hefty@intel.com>
Fri, 22 Feb 2008 18:40:45 +0000 (10:40 -0800)
committerRoland Dreier <rolandd@cisco.com>
Fri, 29 Feb 2008 21:27:52 +0000 (13:27 -0800)
commitbfe15522c3ab293bd36ba7a45758d303ca88788c
tree28d0af4c0bd5ff24eb3aa988464fff8641d64248
parent1642f57154b6f2cdd4ca475607e380ae542b5cfa
IB/cm: Flush workqueue when removing device

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: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/cm.c