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>
This commit is contained in:
parent
819bb2c00f
commit
b1c4427437
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue