Revision bce61dd49d6ba7799be2de17c772e4c701558f14 authored by Ben Collins on 28 November 2005, 21:43:56 UTC, committed by Linus Torvalds on 28 November 2005, 22:42:23 UTC
Tracked this down on an Ultra Enterprise 3000.  It's a 6-way machine.  Odd
thing about this machine (and it's good for finding bugs like this) is that
the CPU id's are not 0 based.  For instance, on my machine the CPU's are
6/7/10/11/14/15.

This caused some NULL pointer dereference in kernel/workqueue.c because for
single_threaded workqueue's, it hardcoded the cpu to 0.

I changed the 0's to any_online_cpu(cpu_online_mask), which cpumask.h
claims is "First cpu in mask".  So this fits the same usage.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent ee500f2
History
File Mode Size
Kconfig -rw-r--r-- 468 bytes
Kconfig.iosched -rw-r--r-- 1.9 KB
Makefile -rw-r--r-- 287 bytes
as-iosched.c -rw-r--r-- 49.2 KB
cfq-iosched.c -rw-r--r-- 58.1 KB
deadline-iosched.c -rw-r--r-- 20.8 KB
elevator.c -rw-r--r-- 17.8 KB
genhd.c -rw-r--r-- 16.9 KB
ioctl.c -rw-r--r-- 6.6 KB
ll_rw_blk.c -rw-r--r-- 91.5 KB
noop-iosched.c -rw-r--r-- 2.6 KB
scsi_ioctl.c -rw-r--r-- 14.0 KB

back to top