From: Erez Shitrit Date: Thu, 25 Jun 2015 14:13:22 +0000 (+0300) Subject: IB/cm: Do not queue work to a device that's going away X-Git-Tag: omap-for-v4.3/fixes-merge-window~240^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be4b499323bf7291b491c6df51baae62f45b8404;p=pandora-kernel.git IB/cm: Do not queue work to a device that's going away Whenever ib_cm gets remove_one call, like when there is a hot-unplug event, the driver should mark itself as going_down and confirm that no new works are going to be queued for that device. so, the order of the actions are: 1. mark the going_down bit. 2. flush the wq. 3. [make sure no new works for that device.] 4. unregister mad agent. otherwise, works that are already queued can be scheduled after the mad agent was freed. Signed-off-by: Erez Shitrit Signed-off-by: Doug Ledford --- Reading git-diff-tree failed