From: Andrew Morton <akpm@osdl.org>
To: Keith Owens <kaos@sgi.com>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: 2.6.12-rc2 in_atomic() picks up preempt_disable()
Date: Thu, 7 Apr 2005 03:22:20 -0700 [thread overview]
Message-ID: <20050407032220.4a62b45f.akpm@osdl.org> (raw)
In-Reply-To: <13730.1112868613@kao2.melbourne.sgi.com>
Keith Owens <kaos@sgi.com> wrote:
>
> 2.6.12-rc2, with CONFIG_PREEMPT and CONFIG_PREEMPT_DEBUG. The
> in_atomic() macro thinks that preempt_disable() indicates an atomic
> region so calls to __might_sleep() result in a stack trace.
> preempt_count() returns 1, no soft or hard irqs are running and no
> spinlocks are held. It looks like there is no way to distinguish
> between the use of preempt_disable() in the lock functions (atomic) and
> preempt_disable() outside the lock functions (do nothing that might
> migrate me).
Is this new behaviour?
It sounds correct to me:
preempt_disable();
do_something_which_might_sleep();
preempt_enable();
Is buggy?
next prev parent reply other threads:[~2005-04-07 10:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-07 10:10 Keith Owens
2005-04-07 10:17 ` Arjan van de Ven
2005-04-07 12:24 ` Romano Giannetti
2005-04-07 10:22 ` Andrew Morton [this message]
2005-04-07 14:54 ` Ingo Molnar
2005-04-07 18:40 Mikael Pettersson
2005-04-07 18:59 ` Ingo Molnar
2005-04-07 20:17 ` Arjan van de Ven
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=20050407032220.4a62b45f.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=kaos@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®