mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* race in smp idle task startup
@ 2003-05-23 13:09 Andi Kleen
  0 siblings, 0 replies; only message in thread
From: Andi Kleen @ 2003-05-23 13:09 UTC (permalink / raw)
  To: mingo, linux-kernel


I think it was there before, but I now noticed it:

The 2.5 SMP bootup path does now:

 	idle = fork_by_hand();
 	if (IS_ERR(idle))
	 		panic("failed fork for CPU %d", cpu);
	wake_up_forked_process(idle);

	<----------- process on run queue ---------------->

	/*
	 * We remove it from the pidhash and the runqueue
 	 * once we got the process:
 	 */
 	init_idle(idle,cpu);

But sched_init has been called before and the load balance timers 
are already running. If you have multiple CPUs to start another CPU
could come and balance the idle thread away. Its registers contain
random values from fork_by_hand so it would likely crash.

It probably needs a __wake_up_forked_process that does not actually
put it onto an runqueue. Or did I miss something?

-Andi


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-23 12:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-23 13:09 race in smp idle task startup Andi Kleen

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®