Thread (3 messages) 3 messages, 3 authors, 2017-06-10

Re: [PATCH] net: tipc: Fix a sleep-in-atomic bug in tipc_msg_reverse

flat view

From: David Miller <davem@davemloft.net>
Date: 2017-06-10 22:21:45
Also in: lkml

From: Jia-Ju Bai <redacted>
Date: Sat, 10 Jun 2017 17:03:35 +0800
The kernel may sleep under a rcu read lock in tipc_msg_reverse, and the
function call path is:
tipc_l2_rcv_msg (acquire the lock by rcu_read_lock)
  tipc_rcv
    tipc_sk_rcv
      tipc_msg_reverse
        pskb_expand_head(GFP_KERNEL) --> may sleep
tipc_node_broadcast
  tipc_node_xmit_skb
    tipc_node_xmit
      tipc_sk_rcv
        tipc_msg_reverse
          pskb_expand_head(GFP_KERNEL) --> may sleep

To fix it, "GFP_KERNEL" is replaced with "GFP_ATOMIC".

Signed-off-by: Jia-Ju Bai <redacted>
Applied and queued up for -stable.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help