]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
RDMA/iwcm: Release resources if iw_cm module initialization fails
authorLeon Romanovsky <leonro@nvidia.com>
Fri, 23 Jul 2021 14:08:55 +0000 (17:08 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 5 Nov 2021 09:17:55 +0000 (10:17 +0100)
commitaf8f71aa81740e0d95e2584634bb83d15b80774d
tree63ceb46ab0548cc1b5343d476957e2f6e9e4cc17
parentb43cf427fcc7bbf17e6835a8797429c87269aeb9
RDMA/iwcm: Release resources if iw_cm module initialization fails

BugLink: https://bugs.launchpad.net/bugs/1947781
[ Upstream commit e677b72a0647249370f2635862bf0241c86f66ad ]

The failure during iw_cm module initialization partially left the system
with unreleased memory and other resources. Rewrite the module init/exit
routines in such way that netlink commands will be opened only after
successful initialization.

Fixes: b493d91d333e ("iwcm: common code for port mapper")
Link: https://lore.kernel.org/r/b01239f99cb1a3e6d2b0694c242d89e6410bcd93.1627048781.git.leonro@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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/infiniband/core/iwcm.c