Re: [PATCH net v5] mctp i2c: fix double free of midev on netdev register failure
From: patchwork-bot+netdevbpf
Date: Thu Dec 03 2026 - 05:30:15 EST
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@xxxxxxxxxx>:
On Tue, 24 Nov 2026 18:12:37 +0800 you wrote:
> mctp_i2c_add_netdev() frees midev if mctp_register_netdev() fails, but
> register_netdevice() may already have freed it through ndo_uninit,
> mctp_i2c_ndo_uninit(). midev is then freed twice: list_del() runs on a
> poisoned entry, and the adapter and client lose a second reference.
>
> Free midev only where it was set up: in the add_netdev() error path,
> and in mctp_i2c_unregister() before free_netdev().
>
> [...]
Here is the summary with links:
- [net,v5] mctp i2c: fix double free of midev on netdev register failure
https://git.kernel.org/netdev/net-next/c/c502311f8d57
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html