aboutsummaryrefslogtreecommitdiff
path: root/lib/cpu_rmap.c
diff options
context:
space:
mode:
authorIsrael Rukshin <[email protected]>2020-04-07 11:02:28 +0000
committerChristoph Hellwig <[email protected]>2020-04-07 18:33:45 +0200
commit21f9024355e58772ec5d7fc3534aa5e29d72a8b6 (patch)
tree47ba0de634076493732a837506da4bc25fe880a8 /lib/cpu_rmap.c
parent8c5c660529209a0e324c1c1a35ce3f83d67a2aa5 (diff)
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 <[email protected]> Suggested-by: Sagi Grimberg <[email protected]> Reviewed-by: Max Gurtovoy <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'lib/cpu_rmap.c')
0 files changed, 0 insertions, 0 deletions