Re: [PATCH net] net/mlx5: macsec: Don't remove fs_id when adding a rule fails

From: patchwork-bot+netdevbpf

Date: Tue Nov 10 2026 - 18:04:26 EST


Hello:

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

On Wed, 4 Nov 2026 19:34:19 -0500 you wrote:
> macsec_fs_tx_add_rule() and macsec_fs_rx_add_rule() clean up a failed
> rule with macsec_fs_{tx,rx}_del_rule(), which also calls
> macsec_fs_id_del(). The fs_id is never in the xarray at that point:
> macsec_fs_id_add() is the last step of adding a rule and removes its
> own entry when it fails.
>
> macsec_fs_id_del() then dereferences NULL, through macsec_device for
> the first SA of a MACsec netdev and through fs_id_found otherwise. On
> RX, the SAs of one SC share an fs_id, so a failure while adding another
> SA drops the reference that an existing SA holds.
>
> [...]

Here is the summary with links:
- [net] net/mlx5: macsec: Don't remove fs_id when adding a rule fails
https://git.kernel.org/netdev/net/c/5175da73dd12

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