]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-rdma: fix a segmentation fault during module unload
authorMax Gurtovoy <maxg@mellanox.com>
Tue, 29 Oct 2019 14:42:27 +0000 (16:42 +0200)
committerKeith Busch <kbusch@kernel.org>
Tue, 5 Nov 2019 15:29:23 +0000 (00:29 +0900)
commit254c1b09a70386d3fdb43c69e3ee44e20f1c3ae5
tree67946f38c080349786fd895bee42dbf46ab84cc4
parentb59bde4551a4a7787256963e3b49af17b181b5d6
nvme-rdma: fix a segmentation fault during module unload

In case there are controllers that are not associated with any RDMA
device (e.g. during unsuccessful reconnection) and the user will unload
the module, these controllers will not be freed and will access already
freed memory. The same logic appears in other fabric drivers as well.

Fixes: a2a43e43c0bc ("nvme-rdma: remove redundant reference between ib_device and tagset")
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/rdma.c