]> git.baikalelectronics.ru Git - kernel.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)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Jul 2022 04:50:54 +0000 (21:50 -0700)
commit9a0f611f2a9cda36de014cae889c2e17e628636a
tree792c7a6c73684c1e2bafc1dfefecd50f9fecb317
parent5ce809c06e54ae84a43f314f4db172ffff42a1b1
net/tls: Perform immediate device ctx cleanup when possible

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>
net/tls/tls_device.c