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)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 16 Nov 2020 18:34:01 +0000 (14:34 -0400)
commitc80a0c52d85c49a910d0dc0e342e8d8898677dc0
tree320d8d7c941f888b211668ad711835ee3e421be9
parent0413755c95e76972451ac8433151bc368a065a3f
RDMA/cma: Add missing error handling of listen_id

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>
drivers/infiniband/core/cma.c