Re: ACPI/cpu hotplug: possible lockdep

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux