summaryrefslogtreecommitdiffstats
path: root/net/ipv4/cipso_ipv4.c
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@163.com>2017-06-10 16:49:39 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-05 14:37:14 +0200
commit7de53eed6fda3354ef8f2d3748d0ecfef88e0475 (patch)
treeaf18e90a680104a325806598ea305a8644c7789d /net/ipv4/cipso_ipv4.c
parent030a77d2f904a3a2cdf9690744d06d075fa2f512 (diff)
downloadlinux-stable-7de53eed6fda3354ef8f2d3748d0ecfef88e0475.tar.gz
linux-stable-7de53eed6fda3354ef8f2d3748d0ecfef88e0475.tar.bz2
linux-stable-7de53eed6fda3354ef8f2d3748d0ecfef88e0475.zip
net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx
[ Upstream commit f146e872eb12ebbe92d8e583b2637e0741440db3 ] The kernel may sleep under a rcu read lock in cfpkt_create_pfx, and the function call path is: cfcnfg_linkup_rsp (acquire the lock by rcu_read_lock) cfctrl_linkdown_req cfpkt_create cfpkt_create_pfx alloc_skb(GFP_KERNEL) --> may sleep cfserl_receive (acquire the lock by rcu_read_lock) cfpkt_split cfpkt_create_pfx alloc_skb(GFP_KERNEL) --> may sleep There is "in_interrupt" in cfpkt_create_pfx to decide use "GFP_KERNEL" or "GFP_ATOMIC". In this situation, "GFP_KERNEL" is used because the function is called under a rcu read lock, instead in interrupt. To fix it, only "GFP_ATOMIC" is used in cfpkt_create_pfx. Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv4/cipso_ipv4.c')
0 files changed, 0 insertions, 0 deletions