From: "D.J. Barrow" <barrow_dj@yahoo.com>
To: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: SMP race condition on startup with patch
Date: Tue, 30 Apr 2002 04:55:10 -0700 (PDT) [thread overview]
Message-ID: <20020430115510.26880.qmail@web10404.mail.yahoo.com> (raw)
Hi All,
I found a smp race condition on startup
of the 2.4.18 kernel when I put a printk
in schedule.
See the comment below in
/init/main.c
/*
* We need to finalize in a non-__init function or
else race conditions
* between the root thread and the init thread may
cause start_kernel to
* be reaped by free_initmem before the root thread
has proceeded to
* cpu_idle.
*/
static void rest_init(void)
Note that init_idle the first thing called from
cpu_idle.
& it is freed from
free_initmem in the init function in main.c
which may be called before the cpu
gets into cpu_idle.
Here is the patch.
--- linux.orig/kernel/sched.c Fri Dec 21 17:42:04
2001
+++ linux/kernel/sched.c Tue Apr 30 12:22:02
2002
@@ -1299,7 +1299,7 @@
extern unsigned long wait_init_idle;
-void __init init_idle(void)
+void init_idle(void)
{
struct schedule_data * sched_data;
sched_data =
&aligned_data[smp_processor_id()].schedule_data;
=====
D.J. Barrow Linux kernel developer
eMail: dj_barrow@ariasoft.ie
Home: +353-22-47196.
Work: +353-91-758353
__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com
next reply other threads:[~2002-04-30 11:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-30 11:55 D.J. Barrow [this message]
2002-04-30 23:45 ` Alan Cox
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=20020430115510.26880.qmail@web10404.mail.yahoo.com \
--to=barrow_dj@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
/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®