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:59:17 +0000 (20:59 +0200)
commit3b5fd693621bcd0e467f902d508ebd741d10bf75
tree5daf9f4b62e914a63bfe563f2aacd0f4fd62e323
parent34b8ba1cb3372dad71557f963e777d4d03f2d3bd
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