Thread (2 messages) 2 messages, 2 authors, 4d ago

Re: [PATCH net-next] geneve: fix geneve_config leak on register_netdevice() failure

From: patchwork-bot+netdevbpf@kernel.org
Date: 2026-07-22 17:30:44

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski [off-list ref]:

On Tue, 21 Jul 2026 16:39:50 +0000 you wrote:
When geneve_configure() allocates a new geneve_config structure via
geneve_config_alloc() and assigns it to geneve->cfg before calling
register_netdevice(), if register_netdevice() fails early (for example,
in dev_get_valid_name() due to an invalid or duplicate interface name),
register_netdevice() exits without calling dev->priv_destructor.

The caller (e.g. rtnl_newlink()) subsequently calls free_netdev(), which
frees the net_device structure directly via kvfree() because reg_state is
NETREG_UNINITIALIZED, bypassing dev->priv_destructor (geneve_free_dev()).
As a result, the newly allocated geneve_config and its per-CPU dst_cache
are leaked.

[...]
Here is the summary with links:
  - [net-next] geneve: fix geneve_config leak on register_netdevice() failure
    https://git.kernel.org/netdev/net-next/c/24d0af194bcc

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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help