summaryrefslogtreecommitdiff
path: root/crypto/crypto_user.c
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@163.com>2017-10-03 10:25:22 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2017-10-07 12:04:32 +0800
commit9c6caa349a0e05500a378295874d16fc280bbb78 (patch)
tree25b07a18b8741d24349b904aeda2896e8946494e /crypto/crypto_user.c
parent01a1423ce9e05cc57b7ff131d1a49d9a140df28b (diff)
downloadlinux-crypto-9c6caa349a0e05500a378295874d16fc280bbb78.tar.gz
linux-crypto-9c6caa349a0e05500a378295874d16fc280bbb78.zip
crypto: shash - Fix a sleep-in-atomic bug in shash_setkey_unaligned
The SCTP program may sleep under a spinlock, and the function call path is: sctp_generate_t3_rtx_event (acquire the spinlock) sctp_do_sm sctp_side_effects sctp_cmd_interpreter sctp_make_init_ack sctp_pack_cookie crypto_shash_setkey shash_setkey_unaligned kmalloc(GFP_KERNEL) For the same reason, the orinoco driver may sleep in interrupt handler, and the function call path is: orinoco_rx_isr_tasklet orinoco_rx orinoco_mic crypto_shash_setkey shash_setkey_unaligned kmalloc(GFP_KERNEL) To fix it, GFP_KERNEL is replaced with GFP_ATOMIC. This bug is found by my static analysis tool and my code review. Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/crypto_user.c')
0 files changed, 0 insertions, 0 deletions