linux/drivers/infiniband/ulp
Maor Gottlieb 372a178628 IB/srpt: Fix memory leak in srpt_add_one
Failure in srpt_refresh_port() for the second port will leave MAD
registered for the first one, however, the srpt_add_one() will be marked
as "failed" and SRPT will leak resources for that registered but not used
and released first port.

Unregister the MAD agent for all ports in case of failure.

Fixes: a42d985bd5 ("ib_srpt: Initial SRP Target merge for v3.3-rc1")
Link: https://lore.kernel.org/r/20201028065051.112430-1-leon@kernel.org
Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2020-11-02 15:23:55 -04:00
..
ipoib RDMA 5.10 pull request 2020-10-17 11:18:18 -07:00
iser RDMA: Add rdma_connect_locked() 2020-10-28 09:14:49 -03:00
isert Merge branch 'mlx5_active_speed' into rdma.git for-next 2020-09-18 10:31:45 -03:00
opa_vnic treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rtrs RDMA: Add rdma_connect_locked() 2020-10-28 09:14:49 -03:00
srp treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
srpt IB/srpt: Fix memory leak in srpt_add_one 2020-11-02 15:23:55 -04:00
Makefile RDMA/rtrs: include client and server modules into kernel compilation 2020-05-17 18:57:15 -03:00