All of lore.kernel.org
 help / color / mirror / Atom feed
* small migration thread fix
@ 2003-01-10 12:46 Erich Focht
  2003-01-10 13:11 ` William Lee Irwin III
  0 siblings, 1 reply; 4+ messages in thread
From: Erich Focht @ 2003-01-10 12:46 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Linus Torvalds, linux-kernel, Robert Love

[-- Attachment #1: Type: text/plain, Size: 231 bytes --]

Hi,

the small patch fixes a potential problem in the migration thread for
the case that the first CPU in the cpus_allowed mask of a process is
offline. Please consider applying it to your trees.

Thanks!
Regards,
Erich


[-- Attachment #2: migration-fix-2.5.55.patch --]
[-- Type: text/x-diff, Size: 498 bytes --]

diff -urNp linux-2.5.55/kernel/sched.c linux-2.5.55-fix/kernel/sched.c
--- linux-2.5.55/kernel/sched.c	2003-01-09 05:04:22.000000000 +0100
+++ linux-2.5.55-fix/kernel/sched.c	2003-01-10 13:37:40.000000000 +0100
@@ -2108,7 +2108,7 @@ static int migration_thread(void * data)
 		spin_unlock_irqrestore(&rq->lock, flags);
 
 		p = req->task;
-		cpu_dest = __ffs(p->cpus_allowed);
+		cpu_dest = __ffs(p->cpus_allowed & cpu_online_map);
 		rq_dest = cpu_rq(cpu_dest);
 repeat:
 		cpu_src = task_cpu(p);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-01-10 15:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-10 12:46 small migration thread fix Erich Focht
2003-01-10 13:11 ` William Lee Irwin III
2003-01-10 14:29   ` Erich Focht
2003-01-10 15:12     ` William Lee Irwin III

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.