Most recent kernel where this bug did *NOT* occur: none Distribution: Mandriva 2007 Official Hardware Environment: AMD 64 Dual Core 4200+ Problem Description: The second trial to make the same CPU offline does generate an OOPS Steps to reproduce: echo 0 > /sys/devices/system/cpu/cpu1/online echo 1 > /sys/devices/system/cpu/cpu1/online echo 0 > /sys/devices/system/cpu/cpu1/online
Created attachment 10020 [details] dmesg with the oops I suspect that this trouble may be related to the circular dependency, as reported by kernel: ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.19.1 #1 ------------------------------------------------------- stress/5670 is trying to acquire lock: (cpu_bitmask_lock){--..}, at: [<ffffffff8015af7d>] lock_cpu_hotplug+0x6d/0x80 but task is already holding lock: (workqueue_mutex){--..}, at: [<ffffffff8014962f>] workqueue_cpu_callback+0x16f/0x2d0 which lock already depends on the new lock. stress is just a script doing echo to cpu hotplug sysfs interface: echo Making CPU online echo 0 >/sys/devices/system/cpu/cpu1/online echo Making CPU offline echo 1 >/sys/devices/system/cpu/cpu1/online echo Making CPU online echo 0 >/sys/devices/system/cpu/cpu1/online
Created attachment 10025 [details] This patch fixed the oops. However, kernel still complains about recursive locking
Andrew Morton pointed to a patch from Christoph Lameter <clameter@sgi.com> that fixes the issue. It would be better to have this patch applied to -stable. After the patch, it still complains about bad locking.