Re: [PATCH v2] net/smc: hold a reference on net_device returned by pnet_find_base_ndev()

From: patchwork-bot+netdevbpf

Date: Thu Oct 15 2026 - 20:01:31 EST


Hello:

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

On Wed, 7 Oct 2026 00:00:09 -0400 you wrote:
> pnet_find_base_ndev() resolves the base net_device for stacked devices
> under RTNL, then drops the lock and returns the raw pointer without
> taking a reference. All three callers dereference the pointer after
> RTNL has been released, creating a use-after-free window if the device
> is concurrently unregistered.
>
> Take a reference with netdev_hold() before dropping RTNL and add the
> matching netdev_put() in every return path of the three callers:
>
> [...]

Here is the summary with links:
- [v2] net/smc: hold a reference on net_device returned by pnet_find_base_ndev()
https://git.kernel.org/netdev/net-next/c/e6435b2cc5fd

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