aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-cmp.c
diff options
context:
space:
mode:
authorMing Lei <[email protected]>2017-11-09 19:32:07 +0800
committerJens Axboe <[email protected]>2017-11-10 19:53:25 -0700
commit03e0f3a65e4da497c3b7b213c68943cbc73a2e34 (patch)
tree0eff01e06d1998f467cfff23abaebba9316b77c6 /lib/mpi/mpi-cmp.c
parente3d7874dcf175cca2dca7795d6453f637ad8ba9b (diff)
nvme-pci: avoid dereference of symbol from unloaded module
The 'remove_work' may be scheduled to run after nvme_remove() returns since we can't simply cancel it in nvme_remove() for avoiding deadlock. Once nvme_remove() returns, this module(nvme) can be unloaded. On the other hand, nvme_put_ctrl() calls ctr->ops->free_ctrl which may point to nvme_pci_free_ctrl() in unloaded module. This patch avoids this issue by queuing 'remove_work' via 'nvme_wq', and flush this worqueue in nvme_exit() as suggested by Sagi. Suggested-by: Sagi Grimberg <[email protected]> Signed-off-by: Ming Lei <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions