2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-28 07:04:00 +08:00
linux-next/drivers/crypto/chelsio
Atul Gupta df9d4a1780 net/tls: sleeping function from invalid context
HW unhash within mutex for registered tls devices cause sleep
when called from tcp_set_state for TCP_CLOSE. Release lock and
re-acquire after function call with ref count incr/dec.
defined kref and fp release for tls_device to ensure device
is not released outside lock.

BUG: sleeping function called from invalid context at
kernel/locking/mutex.c:748
in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper/7
INFO: lockdep is turned off.
CPU: 7 PID: 0 Comm: swapper/7 Tainted: G        W  O
Call Trace:
 <IRQ>
 dump_stack+0x5e/0x8b
 ___might_sleep+0x222/0x260
 __mutex_lock+0x5c/0xa50
 ? vprintk_emit+0x1f3/0x440
 ? kmem_cache_free+0x22d/0x2a0
 ? tls_hw_unhash+0x2f/0x80
 ? printk+0x52/0x6e
 ? tls_hw_unhash+0x2f/0x80
 tls_hw_unhash+0x2f/0x80
 tcp_set_state+0x5f/0x180
 tcp_done+0x2e/0xe0
 tcp_rcv_state_process+0x92c/0xdd3
 ? lock_acquire+0xf5/0x1f0
 ? tcp_v4_rcv+0xa7c/0xbe0
 ? tcp_v4_do_rcv+0x70/0x1e0

Signed-off-by: Atul Gupta <atul.gupta@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-12-14 13:39:39 -08:00
..
chtls net/tls: sleeping function from invalid context 2018-12-14 13:39:39 -08:00
chcr_algo.c crypto: chelsio - Update ntx queue received from cxgb4 2018-10-17 14:16:19 +08:00
chcr_algo.h crypt: chelsio - Send IV as Immediate for cipher algo 2018-05-31 00:13:48 +08:00
chcr_core.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-10-25 16:43:35 -07:00
chcr_core.h crypt: chelsio - Send IV as Immediate for cipher algo 2018-05-31 00:13:48 +08:00
chcr_crypto.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-10-17 14:14:06 +08:00
chcr_ipsec.c crypto: chelsio - request to HW should wrap 2018-05-19 00:13:56 +08:00
Kconfig crypto: chtls - Makefile Kconfig 2018-03-31 23:37:33 -04:00
Makefile crypto: chtls - Makefile Kconfig 2018-03-31 23:37:33 -04:00