]> 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)
commitacae0a105cebbac1500c1652e726e07ad01dac62
tree5a46422ff644893846fb9537e6e702c7d4655952
parenteaaf2096ef745452ec246704e9eb42ff28558ae2
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: f364e19ebc72 ("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