Re: [PATCH net] net/sched: flower: Fix wrong handle assignment during filter change

From: patchwork-bot+netdevbpf
Date: Thu Apr 27 2023 - 04:40:29 EST


Hello:

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

On Tue, 25 Apr 2023 16:06:04 +0200 you wrote:
> Commit 08a0063df3ae ("net/sched: flower: Move filter handle initialization
> earlier") moved filter handle initialization but an assignment of
> the handle to fnew->handle is done regardless of fold value. This is wrong
> because if fold != NULL (so fold->handle == handle) no new handle is
> allocated and passed handle is assigned to fnew->handle. Then if any
> subsequent action in fl_change() fails then the handle value is
> removed from IDR that is incorrect as we will have still valid old filter
> instance with handle that is not present in IDR.
> Fix this issue by moving the assignment so it is done only when passed
> fold == NULL.
>
> [...]

Here is the summary with links:
- [net] net/sched: flower: Fix wrong handle assignment during filter change
https://git.kernel.org/netdev/net/c/32eff6bacec2

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