net/mlx5e: kTLS, Fix crash in RX resync flow
authorTariq Toukan <tariqt@nvidia.com>
Wed, 15 Sep 2021 10:25:31 +0000 (13:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Nov 2021 08:48:37 +0000 (09:48 +0100)
commitebeda7a9528ae690e6bf12791a868f0cca8391f2
tree285d3f8dcedc707b59be72c782cc7137b14df215
parentb70e072feffa0ba5c41a99b9524b9878dee7748e
net/mlx5e: kTLS, Fix crash in RX resync flow

[ Upstream commit cc4a9cc03faa6d8db1a6954bb536f2c1e63bdff6 ]

For the TLS RX resync flow, we maintain a list of TLS contexts
that require some attention, to communicate their resync information
to the HW.
Here we fix list corruptions, by protecting the entries against
movements coming from resync_handle_seq_match(), until their resync
handling in napi is fully completed.

Fixes: e9ce991bce5b ("net/mlx5e: kTLS, Add resiliency to RX resync failures")
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c