summaryrefslogtreecommitdiffstats
path: root/lib/mpi/mpi-inline.h
diff options
context:
space:
mode:
authorChao Leng <lengchao@huawei.com>2020-10-12 10:10:40 +0200
committerChristoph Hellwig <hch@lst.de>2020-10-22 15:27:13 +0200
commit43efdb8e870ee0f58633fd579aa5b5185bf5d39e (patch)
tree58d20765edc2c65c0183e425e1ef1a0c6cab4018 /lib/mpi/mpi-inline.h
parentblock: remove unused members for io_context (diff)
downloadlinux-43efdb8e870ee0f58633fd579aa5b5185bf5d39e.tar.xz
linux-43efdb8e870ee0f58633fd579aa5b5185bf5d39e.zip
nvme-rdma: fix crash when connect rejected
A crash can happened when a connect is rejected. The host establishes the connection after received ConnectReply, and then continues to send the fabrics Connect command. If the controller does not receive the ReadyToUse capsule, host may receive a ConnectReject reply. Call nvme_rdma_destroy_queue_ib after the host received the RDMA_CM_EVENT_REJECTED event. Then when the fabrics Connect command times out, nvme_rdma_timeout calls nvme_rdma_complete_rq to fail the request. A crash happenes due to use after free in nvme_rdma_complete_rq. nvme_rdma_destroy_queue_ib is redundant when handling the RDMA_CM_EVENT_REJECTED event as nvme_rdma_destroy_queue_ib is already called in connection failure handler. Signed-off-by: Chao Leng <lengchao@huawei.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'lib/mpi/mpi-inline.h')
0 files changed, 0 insertions, 0 deletions