]> git.baikalelectronics.ru Git - kernel.git/commit
sched: fix incorrect assumption that cpu 0 exists
authorJames Bottomley <James.Bottomley@SteelEye.com>
Mon, 29 Oct 2007 20:18:11 +0000 (21:18 +0100)
committerIngo Molnar <mingo@elte.hu>
Mon, 29 Oct 2007 20:18:11 +0000 (21:18 +0100)
commit6ffee82793952673952b7963a9af2c749f246927
tree29af1dd7d73da9c06e6295debf0bf963085a1589
parent22a316ae7d4bf3e709d67778fcc6363e27b48f55
sched: fix incorrect assumption that cpu 0 exists

This patch:

commit 79fbe611def3bfc9ede73f25d896c1ab538929e7
Author: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Date:   Mon Oct 15 17:00:09 2007 +0200

    sched: clean up code under CONFIG_FAIR_GROUP_SCHED

Introduced an assumption of the existence of CPU0 via this line

cfs_rq = tg->cfs_rq[0];

If you have no CPU0, that will be NULL.  The fix seems to be just to
take whatever cfs_rq queue comes out of the for_each_possible_cpu()
loop, since they're all equally good for the destruction operation.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c