On Wednesday, July 30, 2014 02:10:35 PM Gu Zheng wrote:
> Hi Rafael,

Hi,

> A lockdep warning occurs when hot removing a cpu via sysfs:
> echo 1 > /sys/bus/acpi/devices/LNXCPU\:02/eject
> The kernel is latest upstream, and the test box is a kvm vm,
> detail info as following.

Well, I have a theory.

Is the splat still reproducible with the patch below applied?

Rafael

---
 kernel/smp.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-pm/kernel/smp.c
===================================================================
--- linux-pm.orig/kernel/smp.c
+++ linux-pm/kernel/smp.c
@@ -542,6 +542,7 @@ void __init smp_init(void)
 
        idle_threads_init();
 
+       lock_device_hotplug();
        /* FIXME: This should be done in userspace --RR */
        for_each_present_cpu(cpu) {
                if (num_online_cpus() >= setup_max_cpus)
@@ -549,6 +550,7 @@ void __init smp_init(void)
                if (!cpu_online(cpu))
                        cpu_up(cpu);
        }
+       unlock_device_hotplug();
 
        /* Any cleanup work */
        smp_announce();

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to