summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@163.com>2017-05-31 15:08:25 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-13 19:48:17 +0200
commit96770d43016bbb1f0491c2611f0a5e07092101f2 (patch)
tree907473ef58c935c8f2d8f708ae362030cefc9a6d
parent50f48039a7bd246aeafdb6733d406ab7c1a6a96a (diff)
downloadlinux-stable-96770d43016bbb1f0491c2611f0a5e07092101f2.tar.gz
linux-stable-96770d43016bbb1f0491c2611f0a5e07092101f2.tar.bz2
linux-stable-96770d43016bbb1f0491c2611f0a5e07092101f2.zip
mISDN: Fix a sleep-in-atomic bug
[ Upstream commit 93818da5eed63fbc17b64080406ea53b86b23309 ] The driver may sleep under a read spin lock, and the function call path is: send_socklist (acquire the lock by read_lock) skb_copy(GFP_KERNEL) --> may sleep To fix it, the "GFP_KERNEL" is replaced with "GFP_ATOMIC". Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/isdn/mISDN/stack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/isdn/mISDN/stack.c b/drivers/isdn/mISDN/stack.c
index 9cb4b621fbc3..b92a19a594a1 100644
--- a/drivers/isdn/mISDN/stack.c
+++ b/drivers/isdn/mISDN/stack.c
@@ -72,7 +72,7 @@ send_socklist(struct mISDN_sock_list *sl, struct sk_buff *skb)
if (sk->sk_state != MISDN_BOUND)
continue;
if (!cskb)
- cskb = skb_copy(skb, GFP_KERNEL);
+ cskb = skb_copy(skb, GFP_ATOMIC);
if (!cskb) {
printk(KERN_WARNING "%s no skb\n", __func__);
break;