]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix possible use-after-free deleting fdb rule
authorRoi Dayan <roid@nvidia.com>
Sun, 22 Aug 2021 07:14:58 +0000 (10:14 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 26 Aug 2021 22:15:42 +0000 (15:15 -0700)
commit9610a49befbe64e61f0d4ed2e10465f77ce40bd4
treef2ce9bebe4ecbf16123d03fb2f21936b158b7a94
parentef7b44967f3a9267ecf62018167003fd4b31324d
net/mlx5e: Fix possible use-after-free deleting fdb rule

After neigh-update-add failure we are still with a slow path rule but
the driver always assume the rule is an fdb rule.
Fix neigh-update-del by checking slow path tc flag on the flow.
Also fix neigh-update-add for when neigh-update-del fails the same.

Fixes: c08c1530acbc ("net/mlx5e: Use a slow path rule instead if vxlan neighbour isn't available")
Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Paul Blakey <paulb@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c