kernel-fxtec-pro1x/drivers/nvme/target
Israel Rukshin 5fd750e826 nvmet-rdma: fix double free of rdma queue
[ Upstream commit 21f9024355e58772ec5d7fc3534aa5e29d72a8b6 ]

In case rdma accept fails at nvmet_rdma_queue_connect(), release work is
scheduled. Later on, a new RDMA CM event may arrive since we didn't
destroy the cm-id and call nvmet_rdma_queue_connect_fail(), which
schedule another release work. This will cause calling
nvmet_rdma_free_queue twice. To fix this we implicitly destroy the cm_id
with non-zero ret code, which guarantees that new rdma_cm events will
not arrive afterwards. Also add a qp pointer to nvmet_rdma_queue
structure, so we can use it when the cm_id pointer is NULL or was
destroyed.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>
Suggested-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-01 13:14:41 +02:00
..
admin-cmd.c nvmet: fix data units read and written counters in SMART log 2019-10-05 13:09:52 +02:00
configfs.c for-4.19/block-20180812 2018-08-14 10:23:25 -07:00
core.c nvmet: Disable keep-alive timer when kato is cleared to 0h 2020-09-09 19:04:23 +02:00
discovery.c nvmet-rdma: support max(16KB, PAGE_SIZE) inline data 2018-07-23 09:35:16 +02:00
fabrics-cmd.c
fc.c nvmet-fc: Fix a missed _irqsave version of spin_lock in 'nvmet_fc_fod_op_done()' 2020-09-09 19:04:26 +02:00
fcloop.c nvme-fc: Revert "add module to ops template to allow module references" 2020-04-17 10:48:45 +02:00
io-cmd-bdev.c nvmet: fix data_len to 0 for bdev-backed write_zeroes 2019-06-25 11:35:58 +08:00
io-cmd-file.c nvmet: avoid integer overflow in the discard code 2019-12-01 09:16:29 +01:00
Kconfig
loop.c nvmet-loop: Flush nvme_delete_wq when removing the port 2019-09-06 10:21:55 +02:00
Makefile
nvmet.h nvmet: add ns write protect support 2018-08-08 12:00:53 +02:00
rdma.c nvmet-rdma: fix double free of rdma queue 2020-10-01 13:14:41 +02:00