IB/cm: Cancel mad on the DREQ event when the state is MRA_REP_RCVD
authorMark Zhang <markzhang@nvidia.com>
Mon, 4 Apr 2022 08:58:05 +0000 (11:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 18:03:15 +0000 (20:03 +0200)
commitb33e452dd9982b64858d95118b1a23cba3473bf8
treec8f3c7df7e9086af74d3d3cd2cad67414f902ea6
parent59c3e9576fb6254ef475207cbe5a6cb866e7d16d
IB/cm: Cancel mad on the DREQ event when the state is MRA_REP_RCVD

[ Upstream commit 107dd7beba403a363adfeb3ffe3734fe38a05cce ]

On the passive side when the disconnectReq event comes, if the current
state is MRA_REP_RCVD, it needs to cancel the MAD before entering the
DREQ_RCVD and TIMEWAIT states, otherwise the destroy_id may block until
this mad will reach timeout.

Fixes: a977049dacde ("[PATCH] IB: Add the kernel CM implementation")
Link: https://lore.kernel.org/r/75261c00c1d82128b1d981af9ff46e994186e621.1649062436.git.leonro@nvidia.com
Signed-off-by: Mark Zhang <markzhang@nvidia.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/core/cm.c