Skip to content
Commit 343eba69 authored by Jia-Ju Bai's avatar Jia-Ju Bai Committed by David S. Miller
Browse files

net: tipc: Fix a sleep-in-atomic bug in tipc_msg_reverse



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: default avatarJia-Ju Bai <baijiaju1990@163.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f146e872
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment