提交 efb26534 编写于 作者: C Chuhong Yuan 提交者: Yang Yingliang

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: 4be74b42 ("IB/cma: Separate port allocation to network namespaces")
Signed-off-by: NChuhong Yuan <hslester96@gmail.com>
Reviewed-by: NParav Pandit <parav@mellanox.com>
Link: https://lore.kernel.org/r/20191206012426.12744-1-hslester96@gmail.comSigned-off-by: NDoug Ledford <dledford@redhat.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 770abc38
...@@ -4658,6 +4658,7 @@ static int __init cma_init(void) ...@@ -4658,6 +4658,7 @@ static int __init cma_init(void)
err: err:
unregister_netdevice_notifier(&cma_nb); unregister_netdevice_notifier(&cma_nb);
ib_sa_unregister_client(&sa_client); ib_sa_unregister_client(&sa_client);
unregister_pernet_subsys(&cma_pernet_operations);
err_wq: err_wq:
destroy_workqueue(cma_wq); destroy_workqueue(cma_wq);
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册