diff options
| author | Changyul Lee <lcy8047@gmail.com> | 2026-11-04 19:34:19 -0500 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-11-10 13:35:26 -0800 |
| commit | 5175da73dd128520ad6d704d7fe54926ee5f658b (patch) | |
| tree | fe331d2c491dc52dbc803bed1a238bc9552f7631 /tools/perf/scripts/python | |
| parent | 4777203cc9af51db5ae647920c14ee9451e783d7 (diff) | |
net/mlx5: macsec: Don't remove fs_id when adding a rule fails
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.
Split the rule teardown from the fs_id removal and do only the teardown
on the error paths.
Fixes: d4ece08f4b1d ("net/mlx5: Maintain fs_id xarray per MACsec device inside macsec steering")
Signed-off-by: Changyul Lee <lcy8047@gmail.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20261105003419.4016283-1-lcy8047@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
