From: Robert Love <rml@tech9.net>
To: "Adam J. Richter" <adam@yggdrasil.com>
Cc: linux-kernel@vger.kernel.org, spstarr@sh0n.net, venom@sns.it
Subject: Re: BUG(): sched.c: Line 944 - 2.5.35
Date: 16 Sep 2002 14:42:13 -0400 [thread overview]
Message-ID: <1032201735.1010.7.camel@phantasy> (raw)
In-Reply-To: <200209161636.JAA02714@adam.yggdrasil.com>
On Mon, 2002-09-16 at 12:36, Adam J. Richter wrote:
> When I see this problem at boot, preempt_count() returns 0x4000000
> (PREEMPT_ACTIVE) and kernel_locked() returns 0.
>
> I don't understand the semantics of PREEMPT_ACTIVE to know
> whether to
>
> (1) change the test back to using in_interrupt instead of in_atomic, or
> (2) change the definition of in_atomic(), or
> (3) look for a bug somewhere else.
There are two problems: First, PREEMPT_ACTIVE is indeed set on entry to
schedule() from preempt_schedule() so we need to check for that too.
Second, the BUG() is catching a bit of issues... you want something
like:
- if (unlikely(in_atomic()))
- BUG();
+ if (unlikely(in_atomic() && preempt_count() != PREEMPT_ACTIVE)) {
+ printk(KERN_ERR "schedule() called while non-atomic!\n");
+ show_stack(NULL);
+ }
I will send a patch to Linus.
> However, I know experimentally that changing the test back to
> using in_interrupt() results in a possibly unrelated BUG() at line 279
> of rmap.c:
This is unrelated.
Robert Love
next prev parent reply other threads:[~2002-09-16 18:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-16 16:36 Adam J. Richter
2002-09-16 18:42 ` Robert Love [this message]
2002-09-16 22:48 ` venom
-- strict thread matches above, loose matches on Subject: below --
2002-09-16 9:23 Shawn Starr
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=1032201735.1010.7.camel@phantasy \
--to=rml@tech9.net \
--cc=adam@yggdrasil.com \
--cc=linux-kernel@vger.kernel.org \
--cc=spstarr@sh0n.net \
--cc=venom@sns.it \
/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®