]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Avoid unbounded peer devices when unpairing TC hairpin rules
authorAlaa Hleihel <alaa@mellanox.com>
Wed, 5 Sep 2018 08:43:23 +0000 (11:43 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 1 Oct 2018 17:58:00 +0000 (10:58 -0700)
commit97c42e84100edaa31e7fef8a8542161db94ee380
tree78b1569cdc943657507b28ddac738466b1281297
parent2f6e352ddae2767a9587c1a1ba83a6b8e4602b8d
net/mlx5e: Avoid unbounded peer devices when unpairing TC hairpin rules

If the peer device was already unbound, then do not attempt to modify
it's resources, otherwise we will crash on dereferencing non-existing
device.

Fixes: 0d7c7c00b52d ("net/mlx5e: Support offloading TC NIC hairpin flows")
Signed-off-by: Alaa Hleihel <alaa@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en/fs.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/transobj.c
include/linux/mlx5/transobj.h