Linux/linux 62ef81dnet/tls tls_device.c

net/tls: avoid potential deadlock in tls_set_device_offload_rx()

If device supports offload, but offload fails tls_set_device_offload_rx()
will call tls_sw_free_resources_rx() which (unhelpfully) releases
and reacquires the socket lock.

For a small fix release and reacquire the device_offload_lock.

Fixes: 4799ac81e52a ("tls: Add rx inline crypto offload")
Signed-off-by: Jakub Kicinski <jakub.kicinski at netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe at netronome.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
DeltaFile
+2-0net/tls/tls_device.c
+2-01 files

UnifiedSplitRaw