]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/tls: Perform immediate device ctx cleanup when possible
authorTariq Toukan <tariqt@nvidia.com>
Wed, 27 Jul 2022 09:43:41 +0000 (12:43 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Aug 2023 12:23:21 +0000 (14:23 +0200)
commit2d93157b7e2dac9acf3ee4e52189b4c79d1ac77c
tree8d155785ba30dab6f2096b97482f81093e23dee0
parent51222e1c77a17d239262f6c2fe4d45e91742f467
net/tls: Perform immediate device ctx cleanup when possible

[ Upstream commit 113671b255ee3b9f5585a6d496ef0e675e698698 ]

TLS context destructor can be run in atomic context. Cleanup operations
for device-offloaded contexts could require access and interaction with
the device callbacks, which might sleep. Hence, the cleanup of such
contexts must be deferred and completed inside an async work.

For all others, this is not necessary, as cleanup is atomic. Invoke
cleanup immediately for them, avoiding queueing redundant gc work.

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: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 6b47808f223c ("net: tls: avoid discarding data on record close")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/tls/tls_device.c