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 365751863 for ; Wed, 28 Dec 2022 15:16:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ADE71C433EF; Wed, 28 Dec 2022 15:16:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1672240561; bh=Hi6BFIMRcUjPEp2sL+IcqtBoaRRu7/3k8oGvrd7hHKE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZaZTCZ/Ab/YSITpNp5vz5GqUSul/NJUpQ67DkzI6oFzg4hkUR3jk1eNPLIDhEzOuG OA9LATOruzbqNtWd4O4v2PVPpXiMOkE8nivtX1HdXRk3+vGZZbVwUEIqhXHWsCXK1o jQw2TpLvdHG1oOnyNf/vECm81LQntliXe36yxN8Y= 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.15 367/731] RDMA/core: Fix order of nldev_exit call Date: Wed, 28 Dec 2022 15:37:54 +0100 Message-Id: <20221228144307.199336345@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221228144256.536395940@linuxfoundation.org> References: <20221228144256.536395940@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 1519379b116e..ab2106a09f9c 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -2848,8 +2848,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