All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] infiniband: cxgb4: Add cleanup on failure path in c4iw_init_module()
@ 2026-11-21  9:00 Wanhui Fu
  2026-11-21  9:05 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Wanhui Fu @ 2026-11-21  9:00 UTC (permalink / raw)
  To: bharat, jgg, leon; +Cc: linux-rdma, Wanhui Fu

Add c4iw_cm_term() and debugfs_remove_recursive() if reg_workq is
not allocated successfully to release memory.

Signed-off-by: Wanhui Fu <fuwh1120@163.com>
---
 drivers/infiniband/hw/cxgb4/device.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
index 24ac9871ce67..e337494e30ff 100644
--- a/drivers/infiniband/hw/cxgb4/device.c
+++ b/drivers/infiniband/hw/cxgb4/device.c
@@ -1548,6 +1548,8 @@ static int __init c4iw_init_module(void)
 	reg_workq = create_singlethread_workqueue("Register_iWARP_device");
 	if (!reg_workq) {
 		pr_err("Failed creating workqueue to register iwarp device\n");
+		debugfs_remove_recursive(c4iw_debugfs_root);
+		c4iw_cm_term();
 		return -ENOMEM;
 	}
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] infiniband: cxgb4: Add cleanup on failure path in c4iw_init_module()
  2026-11-21  9:00 [PATCH] infiniband: cxgb4: Add cleanup on failure path in c4iw_init_module() Wanhui Fu
@ 2026-11-21  9:05 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-21  9:05 UTC (permalink / raw)
  To: Wanhui Fu; +Cc: linux-rdma

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] RDMA/cxgb4: missing Fixes: trailer on c4iw_init_module() leak
  fix
--

commit a9076097e24c29502aab3a6c3bfee7c36d52d50c
Author: Wanhui Fu <fuwh1120@163.com>

> infiniband: cxgb4: Add cleanup on failure path in c4iw_init_module()
>
> Add c4iw_cm_term() and debugfs_remove_recursive() if reg_workq is
> not allocated successfully to release memory.
>
> Signed-off-by: Wanhui Fu <fuwh1120@163.com>

[Severity: Low]
This fixes a resource leak introduced when reg_workq allocation was added
to c4iw_init_module().  Should this include:

  Fixes: 1c8f1da5d851 ("iw_cxgb4: Fix possible circular dependency locking warning")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261121090058.400020-1-fuwh1120@163.com?part=1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-21  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-21  9:00 [PATCH] infiniband: cxgb4: Add cleanup on failure path in c4iw_init_module() Wanhui Fu
2026-11-21  9:05 ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.