diff mbox series

[rdma-rc] RDMA/core: Fix order of nldev_exit call

Message ID 64e676774a53a406f4cde265d5a4cfd6b8e97df9.1666683334.git.leonro@nvidia.com (mailing list archive)
State Accepted
Headers show
Series [rdma-rc] RDMA/core: Fix order of nldev_exit call | expand

Commit Message

Leon Romanovsky Oct. 25, 2022, 7:37 a.m. UTC
From: Leon Romanovsky <leonro@nvidia.com>

Create symmetrical exit flow by calling to nldev_exit() after
call to rdma_nl_unregister(RDMA_NL_LS).

Fixes: 6c80b41abe22 ("RDMA/netlink: Add nldev initialization flows")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/infiniband/core/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leon Romanovsky Oct. 27, 2022, 12:07 p.m. UTC | #1
On Tue, 25 Oct 2022 10:37:13 +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
> 
> Create symmetrical exit flow by calling to nldev_exit() after
> call to rdma_nl_unregister(RDMA_NL_LS).
> 
> 

Applied, thanks!

[1/1] RDMA/core: Fix order of nldev_exit call
      https://git.kernel.org/rdma/rdma/c/bbdad4967431bd

Best regards,
diff mbox series

Patch

diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index b69e2c4e4d2a..3c422698a51c 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -2851,8 +2851,8 @@  static int __init ib_core_init(void)
 static void __exit ib_core_cleanup(void)
 {
 	roce_gid_mgmt_cleanup();
-	nldev_exit();
 	rdma_nl_unregister(RDMA_NL_LS);
+	nldev_exit();
 	unregister_pernet_device(&rdma_dev_net_ops);
 	unregister_blocking_lsm_notifier(&ibdev_lsm_nb);
 	ib_sa_cleanup();