linux/net/caif
Jia-Ju Bai f146e872eb net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx
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>
2017-06-10 18:19:45 -04:00
..
Kconfig
Makefile
caif_dev.c netns: make struct pernet_operations::id unsigned int 2016-11-18 10:59:15 -05:00
caif_socket.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
caif_usb.c
cfcnfg.c net caif: insert missing spaces in pr_* messages and unbreak multi-line strings 2016-10-28 13:47:33 -04:00
cfctrl.c
cfdbgl.c
cfdgml.c
cffrml.c
cfmuxl.c
cfpkt_skbuff.c net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx 2017-06-10 18:19:45 -04:00
cfrfml.c net: caif: fix erroneous return value 2016-02-18 14:59:35 -05:00
cfserl.c
cfsrvl.c
cfutill.c
cfveil.c
cfvidl.c
chnl_net.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00