kernel-fxtec-pro1x/net/tls
Jakub Kicinski be0343af12 net/tls: replace the sleeping lock around RX resync with a bit lock
[ Upstream commit e52972c11d6b1262964db96d65934196db621685 ]

Commit 38030d7cb779 ("net/tls: avoid NULL-deref on resync during device removal")
tried to fix a potential NULL-dereference by taking the
context rwsem.  Unfortunately the RX resync may get called
from soft IRQ, so we can't use the rwsem to protect from
the device disappearing.  Because we are guaranteed there
can be only one resync at a time (it's called from strparser)
use a bit to indicate resync is busy and make device
removal wait for the bit to get cleared.

Note that there is a leftover "flags" field in struct
tls_context already.

Fixes: 4799ac81e5 ("tls: Add rx inline crypto offload")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-11 12:20:49 +02:00
..
Kconfig
Makefile
tls_device.c net/tls: replace the sleeping lock around RX resync with a bit lock 2019-06-11 12:20:49 +02:00
tls_device_fallback.c net/tls: avoid NULL pointer deref on nskb->sk in fallback 2019-05-05 14:42:38 +02:00
tls_main.c net/tls: don't leak IV and record seq when offload fails 2019-05-02 09:59:01 +02:00
tls_sw.c net/tls: don't leak IV and record seq when offload fails 2019-05-02 09:59:01 +02:00