From: Chuhong Yuan Date: Fri, 6 Dec 2019 01:24:26 +0000 (+0800) Subject: RDMA/cma: add missed unregister_pernet_subsys in init failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e47a078195d365e883a7dc36e0701552e383a47c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git RDMA/cma: add missed unregister_pernet_subsys in init failure [ Upstream commit 44a7b6759000ac51b92715579a7bba9e3f9245c2 ] The driver forgets to call unregister_pernet_subsys() in the error path of cma_init(). Add the missed call to fix it. Fixes: 4be74b42a6d0 ("IB/cma: Separate port allocation to network namespaces") Signed-off-by: Chuhong Yuan Reviewed-by: Parav Pandit Link: https://lore.kernel.org/r/20191206012426.12744-1-hslester96@gmail.com Signed-off-by: Doug Ledford Signed-off-by: Sasha Levin --- diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index f698c6a28c14..fc4630e4acdd 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -4568,6 +4568,7 @@ err: unregister_netdevice_notifier(&cma_nb); rdma_addr_unregister_client(&addr_client); ib_sa_unregister_client(&sa_client); + unregister_pernet_subsys(&cma_pernet_operations); err_wq: destroy_workqueue(cma_wq); return ret;