linux/drivers/nvme/target
Israel Rukshin 21f9024355 nvmet-rdma: fix double free of rdma queue
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>
2020-04-07 18:33:45 +02:00
..
admin-cmd.c for-5.7/drivers-2020-03-29 2020-03-30 11:43:51 -07:00
configfs.c nvmet: fix NULL dereference when removing a referral 2020-04-02 10:51:56 +02:00
core.c nvmet: make ctrl model configurable 2020-03-04 09:09:08 -08:00
discovery.c nvmet: fill discovery controller sn, fr and mn correctly 2019-11-04 10:56:42 -07:00
fabrics-cmd.c nvmet: Fix controller use after free 2020-02-05 01:13:09 +09:00
fc.c nvmet-fc: fix typo in comment 2020-03-31 16:24:59 +02:00
fcloop.c nvme-fc: Revert "add module to ops template to allow module references" 2020-04-04 09:09:39 +02:00
io-cmd-bdev.c nvmet: fix dsm failure when payload does not match sgl descriptor 2020-02-04 03:00:24 +09:00
io-cmd-file.c nvmet: fix dsm failure when payload does not match sgl descriptor 2020-02-04 03:00:24 +09:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
loop.c nvme: Make nvme_uninit_ctrl symmetric to nvme_init_ctrl 2020-03-26 04:51:56 +09:00
Makefile nvmet: introduce target-side trace 2019-06-21 11:15:46 +02:00
nvmet.h nvmet: Add get_mdts op for controllers 2020-03-26 04:51:54 +09:00
rdma.c nvmet-rdma: fix double free of rdma queue 2020-04-07 18:33:45 +02:00
tcp.c for-5.7/drivers-2020-03-29 2020-03-30 11:43:51 -07:00
trace.c nvmet: trace: parse Get LBA Status command in detail 2019-08-29 12:55:01 -07:00
trace.h nvmet: introduce target-side trace 2019-06-21 11:15:46 +02:00