Re: [PATCH net] net/l2tp: fix warning in l2tp_exit_net found by syzbot

From: patchwork-bot+netdevbpf
Date: Tue Nov 26 2024 - 04:00:28 EST


Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@xxxxxxxxxx>:

On Mon, 18 Nov 2024 14:04:11 +0000 you wrote:
> In l2tp's net exit handler, we check that an IDR is empty before
> destroying it:
>
> WARN_ON_ONCE(!idr_is_empty(&pn->l2tp_tunnel_idr));
> idr_destroy(&pn->l2tp_tunnel_idr);
>
> By forcing memory allocation failures in idr_alloc_32, syzbot is able
> to provoke a condition where idr_is_empty returns false despite there
> being no items in the IDR. This turns out to be because the radix tree
> of the IDR contains only internal radix-tree nodes and it is this that
> causes idr_is_empty to return false. The internal nodes are cleaned by
> idr_destroy.
>
> [...]

Here is the summary with links:
- [net] net/l2tp: fix warning in l2tp_exit_net found by syzbot
https://git.kernel.org/netdev/net/c/5d066766c5f1

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