netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Neil Horman <nhorman@tuxdriver.com>,
	Netdev <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: packet_sendmsg_spkt sleeping from invalid context
Date: Mon, 14 Dec 2009 22:30:04 +0100	[thread overview]
Message-ID: <20091214213002.GA5203@nowhere> (raw)
In-Reply-To: <4B26AD65.1020004@gmail.com>

On Mon, Dec 14, 2009 at 10:25:57PM +0100, Eric Dumazet wrote:
> Le 14/12/2009 21:52, Frederic Weisbecker a écrit :
> > 
> > I also wonder. Are you using PREEMPT_RCU ?
> 
> Not at all :)
> 
> But yes, this is illegal to do the memcpy_fromiovec() in rcu_read_lock() context.


I've just tested, and with rcu preempt it is mute, no warning :)


> > That may explain why you haven't seen this issue because
> > might_sleep() doesn't see you are in a rcu read locked
> > section as preemption is not disabled, but it is illegal to
> > voluntarily sleep in such area (although it's fine with
> > preempt rcu) as doing so with non-prempt RCU config would barf.
> > 
> > I'm trying a patch to handle that.
> 
> As you want, I also have a patch testing right now :)


But mine is to teach might_sleep() to handle rcu preempt case,
not to fix this net dev thing.

But I'll happily test the fix you have :)

Thanks.

  reply	other threads:[~2009-12-14 21:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-14 17:52 packet_sendmsg_spkt sleeping from invalid context Frederic Weisbecker
2009-12-14 19:24 ` Eric Dumazet
2009-12-14 20:11   ` Frederic Weisbecker
2009-12-14 20:52   ` Frederic Weisbecker
2009-12-14 21:25     ` Eric Dumazet
2009-12-14 21:30       ` Frederic Weisbecker [this message]
2009-12-14 21:39         ` Eric Dumazet
2009-12-15 15:13           ` Frederic Weisbecker
2009-12-15 15:47             ` Eric Dumazet
2009-12-16  5:14               ` David Miller

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=20091214213002.GA5203@nowhere \
    --to=fweisbec@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    /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;
as well as URLs for NNTP newsgroup(s).