]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Prevent possible races in VXLAN control flow
authorGal Pressman <galp@mellanox.com>
Mon, 4 Dec 2017 07:57:43 +0000 (09:57 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 19 Dec 2017 21:24:03 +0000 (23:24 +0200)
commit3816b343786b283a43183371e6a1107b129592e1
tree29ed30ddcfe4ddfcea7ea74bbf88af4798748579
parent70384068f04d4e65d619a24dd930b6f1fc09c618
net/mlx5e: Prevent possible races in VXLAN control flow

When calling add/remove VXLAN port, a lock must be held in order to
prevent race scenarios when more than one add/remove happens at the
same time.
Fix by holding our state_lock (mutex) as done by all other parts of the
driver.
Note that the spinlock protecting the radix-tree is still needed in
order to synchronize radix-tree access from softirq context.

Fixes: 4956da906c0d ("net/mlx5e: Add netdev support for VXLAN tunneling")
Signed-off-by: Gal Pressman <galp@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/vxlan.c