From: Andrew Morton <akpm@linux-foundation.org>
To: David Miller <davem@davemloft.net>
Cc: andi@firstfloor.org, roger.larsson@e-gatan.se,
linux-kernel@vger.kernel.org, mingo@elte.hu, rml@tech9.net,
pavel@ucw.cz, netdev@vger.kernel.org
Subject: Re: PROBLEM: in_atomic() misuse all over the place
Date: Sat, 31 Jan 2009 00:58:15 -0800 [thread overview]
Message-ID: <20090131005815.5b662a50.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090131.004843.127193545.davem@davemloft.net>
On Sat, 31 Jan 2009 00:48:43 -0800 (PST) David Miller <davem@davemloft.net> wrote:
> From: Andrew Morton <akpm@linux-foundation.org>
> Date: Fri, 30 Jan 2009 21:49:33 -0800
>
> > Hang on. You said
> >
> > That's typically for softirq vs non softirq, which is important for
> > the network stack.
> >
> > that's what in_softirq() does.
> >
> > Now, if networking is indeed using in_atomic() to detect
> > are-we-inside-a-spinlock then networking is buggy.
> >
> > If networking is _not_ doing that then we can safely switch it to
> > in_sortirq() or in_interrupt(). And this would reenable the bug
> > detection which networking's use of in_atomic() accidentally
> > suppressed.
>
> I think this is a reasonable conclusion, looking at the
> gfp_any() users.
>
> Feel free to change it to use in_softirq() and see what
> explodes in -mm. Report to me your findings :-)
I don't get much network coverage in my testing...
I went for in_interrupt(), which is in_softirq()||in_hardirq(). I
guess that was a bit of a cop-out if the design decision is that this
is purely for are-we-in-softirq decision making.
I'll set it to in_softirq() and shall see what happens..
prev parent reply other threads:[~2009-01-31 8:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200901280010.37633.roger.larsson@e-gatan.se>
2009-01-28 12:18 ` PROBLEM: in_atomic() misuse all over the place Andi Kleen
2009-01-31 0:03 ` Andrew Morton
2009-01-31 5:55 ` Andi Kleen
2009-01-31 5:49 ` Andrew Morton
2009-01-31 8:48 ` David Miller
2009-01-31 8:58 ` Andrew Morton [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=20090131005815.5b662a50.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=netdev@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rml@tech9.net \
--cc=roger.larsson@e-gatan.se \
/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).