Re: [PATCH net] usbnet: Fix memory leak in usbnet_disconnect()

patchwork-bot+netdevbpf
2022-09-26T18:42:34Z

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 22 Sep 2022 21:25:51 -0700 you wrote:
> From: Peilin Ye <peilin.ye@bytedance.com>
>
> Currently usbnet_disconnect() unanchors and frees all deferred URBs
> using usb_scuttle_anchored_urbs(), which does not free urb->context,
> causing a memory leak as reported by syzbot.
>
> Use a usb_get_from_anchor() while loop instead, similar to what we did
> in commit 19cfe912c37b ("Bluetooth: btusb: Fix memory leak in
> play_deferred"). Also free urb->sg.
>
> [...]

Here is the summary with links:
- [net] usbnet: Fix memory leak in usbnet_disconnect()
https://git.kernel.org/netdev/net/c/a43206156263

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.