* [PATCH NET v2 1/1] net: usb: pegasus: fix memory leak in update_eth_regs_async()
@ 2026-01-06 8:48 Petko Manolov
2026-01-08 16:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Petko Manolov @ 2026-01-06 8:48 UTC (permalink / raw)
To: netdev; +Cc: davem, stable, pabeni, andrew, Petko Manolov
From: Petko Manolov <petkan@nucleusys.com>
When asynchronously writing to the device registers and if usb_submit_urb()
fail, the code fail to release allocated to this point resources.
Fixes: 323b34963d11 ("drivers: net: usb: pegasus: fix control urb submission")
Signed-off-by: Petko Manolov <petkan@nucleusys.com>
---
v2:
- replace the auto-cleanup form with the classic kfree();
drivers/net/usb/pegasus.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c
index 81ca64debc5b..c514483134f0 100644
--- a/drivers/net/usb/pegasus.c
+++ b/drivers/net/usb/pegasus.c
@@ -168,6 +168,8 @@ static int update_eth_regs_async(pegasus_t *pegasus)
netif_device_detach(pegasus->net);
netif_err(pegasus, drv, pegasus->net,
"%s returned %d\n", __func__, ret);
+ usb_free_urb(async_urb);
+ kfree(req);
}
return ret;
}
--
2.52.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH NET v2 1/1] net: usb: pegasus: fix memory leak in update_eth_regs_async()
2026-01-06 8:48 [PATCH NET v2 1/1] net: usb: pegasus: fix memory leak in update_eth_regs_async() Petko Manolov
@ 2026-01-08 16:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-01-08 16:50 UTC (permalink / raw)
To: Petko Manolov; +Cc: netdev, davem, stable, pabeni, andrew, petkan
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 6 Jan 2026 10:48:21 +0200 you wrote:
> From: Petko Manolov <petkan@nucleusys.com>
>
> When asynchronously writing to the device registers and if usb_submit_urb()
> fail, the code fail to release allocated to this point resources.
>
> Fixes: 323b34963d11 ("drivers: net: usb: pegasus: fix control urb submission")
> Signed-off-by: Petko Manolov <petkan@nucleusys.com>
>
> [...]
Here is the summary with links:
- [NET,v2,1/1] net: usb: pegasus: fix memory leak in update_eth_regs_async()
https://git.kernel.org/netdev/net/c/afa27621a28a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-08 16:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-06 8:48 [PATCH NET v2 1/1] net: usb: pegasus: fix memory leak in update_eth_regs_async() Petko Manolov
2026-01-08 16:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox