RDMA/cma: add missed unregister_pernet_subsys in init failure
PATCH v2 1/1 RDMA/cma: add missed unregister_pernet_subsys in init failure
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 <[email protected]>
---
Changes in v2:
- Add fixes tag.
drivers/infiniband/core/cma.c | 1 + 1 file changed, 1 insertion(+)
drivers/infiniband/core/cma.c +1 -0
@@ -4763,6 +4763,7 @@ static int __init cma_init(void) err:unregister_netdevice_notifier (&cma_nb);ib_sa_unregister_client (&sa_client); +unregister_pernet_subsys (&cma_pernet_operations); err_wq:destroy_workqueue (cma_wq);return ret;
Signature · 1 line
2.24.0
Quoted 19 lines · Chuhong Yuan
The driver forgets to call
unregister_pernet_subsys()in the error path ofcma_init().
Add the missed call to fix it.Fixes 4be74b42a6d0 ("IB/cma: Separate port allocation to network namespaces")Signed-off-by Chuhong Yuan <[email protected]>---
Changes in v2:
- Add fixes tag.drivers/infiniband/core/cma.c | 1 + 1 file changed, 1 insertion(+)drivers/infiniband/core/cma.c +0
-0
drivers/infiniband/core/cma.c static int __init cma_init(void) · line 4769
Quoted 7 lines
drivers/infiniband/core/cma.c +1
-0@@ -4763,6 +4763,7 @@ static int __init cma_init(void) err:unregister_netdevice_notifier (&cma_nb);ib_sa_unregister_client (&sa_client); +unregister_pernet_subsys (&cma_pernet_operations); err_wq:destroy_workqueue (cma_wq);return ret;
Reviewed-by Parav Pandit <[email protected]>
Doug Ledford
AppliedQuoted 16 lines · Parav Pandit
Quoted 15 lines · Chuhong Yuan
The driver forgets to call
unregister_pernet_subsys()in the error path
ofcma_init().
Add the missed call to fix it.Fixes 4be74b42a6d0 ("IB/cma: Separate port allocation to networknamespaces")
Signed-off-by Chuhong Yuan <[email protected]>---
Changes in v2:
- Add fixes tag.drivers/infiniband/core/cma.c | 1 + 1 file changed, 1 insertion(+)
Quoted 15 lines
Quoted 7 lines
drivers/infiniband/core/cma.c +0
-0drivers/infiniband/core/cma.c static int __init cma_init(void) · line 4769
Quoted 7 lines
drivers/infiniband/core/cma.c +1
-0@@ -4763,6 +4763,7 @@ static int __init cma_init(void) err:unregister_netdevice_notifier (&cma_nb);ib_sa_unregister_client (&sa_client); +unregister_pernet_subsys (&cma_pernet_operations); err_wq:destroy_workqueue (cma_wq);return ret;Reviewed-by Parav Pandit <[email protected]>
Thanks, applied to for-rc.
Signature · 3 lines
Doug Ledford <[email protected]> GPG KeyID: B826A3330E572FDD Fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD