Re: [PATCH net v1 1/2] net: usb: lan78xx: Fix double free issue with interrupt buffer allocation

From: patchwork-bot+netdevbpf
Date: Sun Nov 24 2024 - 19:40:25 EST


Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Sat, 16 Nov 2024 14:05:57 +0100 you wrote:
> In lan78xx_probe(), the buffer `buf` was being freed twice: once
> implicitly through `usb_free_urb(dev->urb_intr)` with the
> `URB_FREE_BUFFER` flag and again explicitly by `kfree(buf)`. This caused
> a double free issue.
>
> To resolve this, reordered `kmalloc()` and `usb_alloc_urb()` calls to
> simplify the initialization sequence and removed the redundant
> `kfree(buf)`. Now, `buf` is allocated after `usb_alloc_urb()`, ensuring
> it is correctly managed by `usb_fill_int_urb()` and freed by
> `usb_free_urb()` as intended.
>
> [...]

Here is the summary with links:
- [net,v1,1/2] net: usb: lan78xx: Fix double free issue with interrupt buffer allocation
https://git.kernel.org/netdev/net/c/03819abbeb11
- [net,v1,2/2] net: usb: lan78xx: Fix memory leak on device unplug by freeing PHY device
https://git.kernel.org/netdev/net/c/ae7370e61c5d

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html