* [PATCH net] bnx2x: Fix potential IRO array leak on removal
@ 2026-11-12 13:59 Guangshuo Li
2026-11-12 14:02 ` netdev-bot+sinfo
0 siblings, 1 reply; 2+ messages in thread
From: Guangshuo Li @ 2026-11-12 13:59 UTC (permalink / raw)
To: Sudarsana Kalluru, Manish Chopra, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: netdev, linux-kernel
Firmware initialization allocates a separate IRO array, but
bnx2x_release_firmware() only frees the other parsed tables. Removing
the device loses the array pointer with the netdev.
Free the IRO array with the remaining firmware tables.
This issue was found by our static analysis tool under development.
Fixes: 523224a3b3cd ("bnx2x, cnic, bnx2i: use new FW/HSI")
Signed-off-by: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 277c7bd9c6e7..c6afde9466be 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -13489,6 +13489,7 @@ static int bnx2x_init_firmware(struct bnx2x *bp)
static void bnx2x_release_firmware(struct bnx2x *bp)
{
+ kfree(bp->iro_arr);
kfree(bp->init_ops_offsets);
kfree(bp->init_ops);
kfree(bp->init_data);
base-commit: 2e54b3e187300893688c2c7517894f5d96732e05
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net] bnx2x: Fix potential IRO array leak on removal
2026-11-12 13:59 [PATCH net] bnx2x: Fix potential IRO array leak on removal Guangshuo Li
@ 2026-11-12 14:02 ` netdev-bot+sinfo
0 siblings, 0 replies; 2+ messages in thread
From: netdev-bot+sinfo @ 2026-11-12 14:02 UTC (permalink / raw)
To: Guangshuo Li
Cc: Sudarsana Kalluru, Manish Chopra, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- What hardware the change was tested on. For driver fixes please
mention the device (and if relevant firmware version) used for
testing, or say that the change was not tested on real hardware.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-12 14:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-12 13:59 [PATCH net] bnx2x: Fix potential IRO array leak on removal Guangshuo Li
2026-11-12 14:02 ` netdev-bot+sinfo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox