From: Robert Love <rml@tech9.net>
To: Steven Cole <elenstev@mesatop.com>
Cc: Ingo Molnar <mingo@elte.hu>, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] BUG(): sched.c: Line 944
Date: 18 Sep 2002 00:44:51 -0400 [thread overview]
Message-ID: <1032324294.4588.758.camel@phantasy> (raw)
In-Reply-To: <1032296284.12257.66.camel@spc9.esa.lanl.gov>
On Tue, 2002-09-17 at 16:58, Steven Cole wrote:
> Sorry, it hung so badly that it didn't respond to that.
I fixed the hang. If you notice the problem, please do not laugh.
The attached patch, against 2.5.36, should work fine...
Robert Love
diff -urN linux-2.5.36/kernel/sched.c linux/kernel/sched.c
--- linux-2.5.36/kernel/sched.c Tue Sep 17 20:58:48 2002
+++ linux/kernel/sched.c Wed Sep 18 00:41:09 2002
@@ -940,9 +940,6 @@
struct list_head *queue;
int idx;
- if (unlikely(in_atomic()))
- BUG();
-
#if CONFIG_DEBUG_HIGHMEM
check_highmem_ptes();
#endif
@@ -950,8 +947,20 @@
preempt_disable();
prev = current;
rq = this_rq();
-
release_kernel_lock(prev);
+
+ /*
+ * Test if we are atomic. Since do_exit() needs to call into
+ * schedule() atomically, we ignore that for now. Otherwise,
+ * whine if we are scheduling when we should not be.
+ */
+ if (likely(current->state != TASK_ZOMBIE)) {
+ if (unlikely((preempt_count() & ~PREEMPT_ACTIVE) != 1)) {
+ printk(KERN_ERR "scheduling while non-atomic!\n");
+ dump_stack();
+ }
+ }
+
prev->sleep_timestamp = jiffies;
spin_lock_irq(&rq->lock);
next prev parent reply other threads:[~2002-09-18 4:39 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-16 18:48 [PATCH] BUG(): sched.c: Line 944 Robert Love
2002-09-16 19:01 ` Linus Torvalds
2002-09-16 21:14 ` Robert Love
2002-09-16 21:41 ` Linus Torvalds
2002-09-16 22:15 ` Robert Love
2002-09-16 22:26 ` Linus Torvalds
2002-09-16 23:15 ` Robert Love
2002-09-16 23:45 ` Linus Torvalds
2002-09-16 23:58 ` Robert Love
2002-09-17 5:56 ` Linus Torvalds
2002-09-17 8:12 ` Robert Love
2002-09-17 8:51 ` Robert Love
2002-09-17 8:59 ` Robert Love
2002-09-17 9:57 ` Ingo Molnar
2002-09-17 18:27 ` Robert Love
2002-09-17 18:46 ` Ingo Molnar
2002-09-17 14:10 ` Steven Cole
2002-09-17 18:29 ` Robert Love
2002-09-17 18:42 ` Steven Cole
2002-09-17 15:27 ` Linus Torvalds
2002-09-17 15:40 ` Linus Torvalds
2002-09-17 15:53 ` Ingo Molnar
2002-09-17 16:18 ` Linus Torvalds
2002-09-17 16:26 ` Ingo Molnar
2002-09-17 18:47 ` Robert Love
2002-09-17 18:57 ` Ingo Molnar
2002-09-17 19:23 ` Robert Love
2002-09-17 19:54 ` Steven Cole
2002-09-17 20:06 ` Robert Love
2002-09-17 20:32 ` Steven Cole
2002-09-17 20:58 ` Steven Cole
2002-09-18 4:44 ` Robert Love [this message]
2002-09-18 14:08 ` Steven Cole
2002-09-17 15:54 ` Ingo Molnar
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=1032324294.4588.758.camel@phantasy \
--to=rml@tech9.net \
--cc=elenstev@mesatop.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