From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 093FB749D for ; Thu, 12 Jan 2023 14:13:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6265EC433D2; Thu, 12 Jan 2023 14:13:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1673532812; bh=o6N6vlmoCFlblH0Da1UjDs2WBURMCs1ODf4GXNm/Ij8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1P4xbWM8x3DrfdXdPdffnupG7Of74DqcFqRZyGJbtJHvQgBGUu0pD47pFBP1XvGt5 mungcha0VwUMfzlri5MMR67B7k6zlQ50puay5vU9Ake5iUqL3lNhBP9ZCxRuaHC96Q AAuvrdMfFSGUABuuZWeCGcaTbmLGtNY7XmsjTcl4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Leon Romanovsky , Leon Romanovsky , Sasha Levin Subject: [PATCH 5.10 285/783] RDMA/core: Fix order of nldev_exit call Date: Thu, 12 Jan 2023 14:50:01 +0100 Message-Id: <20230112135537.605836633@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230112135524.143670746@linuxfoundation.org> References: <20230112135524.143670746@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Leon Romanovsky [ Upstream commit 4508d32ccced24c972bc4592104513e1ff8439b5 ] 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 Link: https://lore.kernel.org/r/64e676774a53a406f4cde265d5a4cfd6b8e97df9.1666683334.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin --- 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 d91892ffe243..5b7abcf102fe 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -2793,8 +2793,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(); -- 2.35.1