Maxim Mikityanskiy 025cc2fb6a net/tls: Protect from calling tls_dev_del for TLS RX twice
tls_device_offload_cleanup_rx doesn't clear tls_ctx->netdev after
calling tls_dev_del if TLX TX offload is also enabled. Clearing
tls_ctx->netdev gets postponed until tls_device_gc_task. It leaves a
time frame when tls_device_down may get called and call tls_dev_del for
RX one extra time, confusing the driver, which may lead to a crash.

This patch corrects this racy behavior by adding a flag to prevent
tls_device_down from calling tls_dev_del the second time.

Fixes: e8f69799810c ("net/tls: Add generic NIC offload infrastructure")
Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Link: https://lore.kernel.org/r/20201125221810.69870-1-saeedm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-25 17:31:06 -08:00
..
2019-01-23 11:18:00 -08:00
2020-10-30 10:06:09 +01:00
2020-08-31 12:33:34 -07:00
2020-05-05 13:23:29 -07:00
2019-12-09 10:36:44 -08:00
2020-06-22 21:12:44 -07:00
2020-08-31 23:06:51 +02:00
2020-10-30 10:06:09 +01:00
2019-12-09 10:36:44 -08:00
2020-09-15 16:31:11 -07:00
2020-03-04 13:25:55 -08:00
2020-03-23 21:57:44 -07:00
2019-04-22 21:47:25 -07:00
2019-10-05 16:29:00 -07:00
2020-09-24 19:58:34 -07:00
2020-06-18 20:46:23 -07:00
2019-12-09 10:28:43 -08:00