Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: baijiaju1990@163.com
Cc: jon.maloy@ericsson.com, tipc-discussion@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] net: tipc: Fix a sleep-in-atomic bug in tipc_msg_reverse
Date: Sat, 10 Jun 2017 18:21:41 -0400 (EDT)	[thread overview]
Message-ID: <20170610.182141.2167495708271774980.davem@davemloft.net> (raw)
In-Reply-To: <1497085415-630-1-git-send-email-baijiaju1990@163.com>

From: Jia-Ju Bai <baijiaju1990@163.com>
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 <baijiaju1990@163.com>

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

      parent reply	other threads:[~2017-06-10 22:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-10  9:03 [PATCH] net: tipc: Fix a sleep-in-atomic bug in tipc_msg_reverse Jia-Ju Bai
2017-06-10 13:18 ` Jon Maloy
2017-06-10 22:21 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170610.182141.2167495708271774980.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=baijiaju1990@163.com \
    --cc=jon.maloy@ericsson.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tipc-discussion@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox