RDMA/cma: Add missing error handling of listen_id
authorLeon Romanovsky <leonro@nvidia.com>
Wed, 4 Nov 2020 14:40:07 +0000 (16:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:12 +0000 (11:53 +0100)
commit70ba8b1697e35c04ea5f22edb6e401aeb1208d96
tree9108a46351578216f760d37476ccda2021800266
parent8d82904f8d220153af49d02273f1751a4426669d
RDMA/cma: Add missing error handling of listen_id

[ Upstream commit c80a0c52d85c49a910d0dc0e342e8d8898677dc0 ]

Don't silently continue if rdma_listen() fails but destroy previously
created CM_ID and return an error to the caller.

Fixes: d02d1f5359e7 ("RDMA/cma: Fix deadlock destroying listen requests")
Link: https://lore.kernel.org/r/20201104144008.3808124-5-leon@kernel.org
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/cma.c