mISDN: Fix a sleep-in-atomic bug
commit96770d43016bbb1f0491c2611f0a5e07092101f2
authorJia-Ju Bai <baijiaju1990@163.com>
Wed, 31 May 2017 07:08:25 +0000 (31 15:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:48:17 +0000 (13 19:48 +0200)
tree907473ef58c935c8f2d8f708ae362030cefc9a6d
parent50f48039a7bd246aeafdb6733d406ab7c1a6a96a
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>
drivers/isdn/mISDN/stack.c