lkml.org 
[lkml]   [2002]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] [sched] set_cpus_allowed() fix, 2.5.3-pre5

the attached patch fixes set_cpus_allowed() to set p->state *before*
sending the migration IPI. This is a rare codepath used during bootup
only, so the race was never seen in action. The bug was noticed by Robert
Love.

Ingo

--- linux/kernel/sched.c.orig Fri Jan 25 10:44:18 2002
+++ linux/kernel/sched.c Fri Jan 25 12:06:36 2002
@@ -803,9 +837,9 @@
if (new_mask & (1UL << smp_processor_id()))
return;
#if CONFIG_SMP
+ current->state = TASK_UNINTERRUPTIBLE;
smp_migrate_task(ffz(~new_mask), current);

- current->state = TASK_UNINTERRUPTIBLE;
schedule();
#endif
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:18    [W:0.022 / U:3.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site