]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix possible race condition in macsec extended packet number update routine
authorEmeel Hakim <ehakim@nvidia.com>
Sun, 30 Oct 2022 09:19:52 +0000 (11:19 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 22 Nov 2022 02:14:35 +0000 (18:14 -0800)
commit7562004d997b8b7a4257ad0aeaa213dff9b79ead
tree6608cc75928d14f0bbc5c01421abe862b756ed3e
parentabbbec8f86f1b81ded35f9ad1c1aa095f73453ae
net/mlx5e: Fix possible race condition in macsec extended packet number update routine

Currenty extended packet number (EPN) update routine is accessing
macsec object without holding the general macsec lock hence facing
a possible race condition when an EPN update occurs while updating
or deleting the SA.
Fix by holding the general macsec lock before accessing the object.

Fixes: 10fad55911fd ("net/mlx5e: Support MACsec offload extended packet number (EPN)")
Signed-off-by: Emeel Hakim <ehakim@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c