nvme-rdma: add clean action for failed reconnection
authorChao Leng <lengchao@huawei.com>
Thu, 21 Jan 2021 03:32:37 +0000 (11:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Mar 2021 11:34:12 +0000 (12:34 +0100)
commit7da81eaf8710130a9e63d7429627183be5a93787
tree360bc1e7b706aa4b0608e3f02b93d8d93c71086d
parent74c4f7aed603033c507d5ddc3f9918e34cbb8948
nvme-rdma: add clean action for failed reconnection

[ Upstream commit 958dc1d32c80566f58d18f05ef1f05bd32d172c1 ]

A crash happens when inject failed reconnection.
If reconnect failed after start io queues, the queues will be unquiesced
and new requests continue to be delivered. Reconnection error handling
process directly free queues without cancel suspend requests. The
suppend request will time out, and then crash due to use the queue
after free.

Add sync queues and cancel suppend requests for reconnection error
handling.

Signed-off-by: Chao Leng <lengchao@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/rdma.c