From patchwork Tue Oct 25 07:37:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 13018656 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2481DC38A2D for ; Tue, 25 Oct 2022 07:37:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231389AbiJYHhY (ORCPT ); Tue, 25 Oct 2022 03:37:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbiJYHhX (ORCPT ); Tue, 25 Oct 2022 03:37:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32A79BFC for ; Tue, 25 Oct 2022 00:37:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E5795B80E9A for ; Tue, 25 Oct 2022 07:37:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B809C433C1; Tue, 25 Oct 2022 07:37:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666683438; bh=pgpwMJRQMqvUMYDdUBYWMzOwpZuq0QXxt91FIoOtxHU=; h=From:To:Cc:Subject:Date:From; b=XtqdWc4NEqCD+nXwxHweLVMk2lOt9BtK3Li2I5tAfTE1InK1RPm9mSSKKWwyOmwLg tBdpf0vmuGzELy93zydDND2kI35PG17iMMWIIjK6mmIuALf5VlzGzxHKkodBbz0lF8 VJX6hcYt/ZhZD2KJNuw9JaRFsNFvzXXdWZSLjm8++S4ydK/naXyAk2hGtvQ/lVmDBo xAYTdBHt3FDhpoR54mjou3gf+MSH7lVFRbrnb3hQtbORR79INGO3aAHVaJ9FUj76WM VMa6xG9pbthBeQ0ttVMd3nKHLOvrZJKXbRqpcBauZBuvQshMcmAG4vJjc9HesWBWNC +Krs/aPnbWLzQ== From: Leon Romanovsky To: Jason Gunthorpe Cc: Leon Romanovsky , linux-rdma@vger.kernel.org, Steve Wise Subject: [PATCH rdma-rc] RDMA/core: Fix order of nldev_exit call Date: Tue, 25 Oct 2022 10:37:13 +0300 Message-Id: <64e676774a53a406f4cde265d5a4cfd6b8e97df9.1666683334.git.leonro@nvidia.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Leon Romanovsky 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 --- drivers/infiniband/core/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();