]> git.hungrycats.org Git - linux/commit
[PATCH] CPU Scheduler: fix potential error in runqueue nr_uninterruptible count
authorPeter Williams <pwil3058@bigpond.net.au>
Mon, 18 Oct 2004 16:11:14 +0000 (09:11 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 18 Oct 2004 16:11:14 +0000 (09:11 -0700)
commit95a2f6d75d878126b883e87a5fd028e971851c93
tree5999b66ddce8d403ceaa26b97a9f0e80f2b01364
parentc07990160b13946faf43d716a8902f6f7cf55a5e
[PATCH] CPU Scheduler: fix potential error in runqueue nr_uninterruptible count

Problem:

In the function try_to_wake_up(), when the runqueue's nr_uninterruptible
field is decremented it's possible (on SMP systems) that the pointer no
longer points to the runqueue that the task being woken was on when it went
to sleep.  This would cause the wrong runqueue's field to be decremented
and the correct one tp remain unchanged.

Fix:

Save a pointer to the old runqueue at the beginning of the function and use
it when decrementing nr_uninterruptible.

Signed-off-by: Peter Williams <pwil3058@bigpond.net.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/sched.c