Re: [PATCH net] net/mlx5e: macsec: free SC lookup entries after an RCU grace period
From: Joas Antonio dos Santos
Date: Tue Oct 27 2026 - 17:27:48 EST
On Tue, Oct 27, 2026 at 02:26:01PM +0000, Simon Horman wrote:
> This patch does not apply because the problem in macsec_del_rxsc_ctx() has
> already been addressed by ad17ad50b8dc ("net: mlx5e: Fix use-after-free of
> the MACsec xarray entry on RX SC deletion") using kfree_rcu.
>
> I would suggest taking that approach in macsec_fs_id_del() too
> unless there is a reason to use mightsleep.
Thanks Simon, I missed that ad17ad50b8dc had already landed. There is no
reason to use the mightsleep variant, so v2 drops the macsec.c hunk and
embeds an rcu_head in struct mlx5_fs_id so it can be freed with
kfree_rcu():
https://lore.kernel.org/all/179313582625.87630.11382992904624255106@xxxxxxxxx/
Joas