Re: [PATCH net v2] genetlink: free the skb on 'group >= family->n_mcgrps'

From: patchwork-bot+netdevbpf

Date: Fri May 08 2026 - 18:51:08 EST


Hello:

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

On Wed, 06 May 2026 20:07:13 +0000 you wrote:
> These methods generally consume ownership of the provided skb, so even
> if an error path is encountered, the skb is freed. This is because the
> very first thing they do after some initial setup is to unconditionally
> consume the skb via consume_skb(skb). Any subsequent errors lead to the
> core netlink layer freeing the skb.
>
> However, there is one check that occurs before ownership is passed,
> which is the check for the group index. So if this error condition is
> encountered, then the skb is leaked. This error condition is generally
> considered a violation of the netlink API, so it's not expected to occur
> under normal circumstances. For the same reason, no callers check for
> this error condition, and no callers need to be adjusted. However, we
> should still follow the same ownership semantics of the rest of the
> function. Thus, free the skb in this codepath.
>
> [...]

Here is the summary with links:
- [net,v2] genetlink: free the skb on 'group >= family->n_mcgrps'
https://git.kernel.org/netdev/net/c/efda25ee8432

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