]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: CT: Use rhashtable's ct entries instead of a separate list
authorPaul Blakey <paulb@mellanox.com>
Fri, 27 Mar 2020 09:12:31 +0000 (12:12 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 8 Apr 2020 22:46:54 +0000 (15:46 -0700)
commit569ad3d93d70c466c8857aadc5472b8fbb6dda10
tree5a46422ff644893846fb9537e6e702c7d4655952
parent8cb886ba8ac2be793fba2bb9b5753eb297d793e3
net/mlx5e: CT: Use rhashtable's ct entries instead of a separate list

Fixes CT entries list corruption.

After allowing parallel insertion/removals in upper nf flow table
layer, unprotected ct entries list can be corrupted by parallel add/del
on the same flow table.

CT entries list is only used while freeing a ct zone flow table to
go over all the ct entries offloaded on that zone/table, and flush
the table.

As rhashtable already provides an api to go over all the inserted entries,
fix the race by using the rhashtable iteration instead, and remove the list.

Fixes: 5090fdb54b35 ("netfilter: flowtable: Use work entry per offload command")
Reviewed-by: Oz Shlomo <ozsh@mellanox.com>
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c