Re: [PATCH net] net/mlx5: E-Switch: fix use-after-free in mlx5_eswitch_termtbl_put

From: patchwork-bot+netdevbpf

Date: Sat Sep 05 2026 - 16:32:57 EST


Hello:

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

On Wed, 2 Sep 2026 22:35:14 +0300 you wrote:
> From: Yael Chemla <ychemla@xxxxxxxxxx>
>
> In mlx5_eswitch_termtbl_put(), the zero-ref cleanup check reads
> tt->ref_count after termtbl_mutex has been released. Two concurrent
> callers on the same mlx5_termtbl_handle race: one decrements ref_count
> to zero, removes the hash entry, and calls kfree(tt) while the other
> has already dropped the mutex and is about to evaluate
> if (!tt->ref_count), producing a use-after-free.
>
> [...]

Here is the summary with links:
- [net] net/mlx5: E-Switch: fix use-after-free in mlx5_eswitch_termtbl_put
https://git.kernel.org/netdev/net/c/7ee07f601f8f

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