mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Gu Zheng <guz.fnst@cn.fujitsu.com>
Cc: rafael.j.wysocki@intel.com, Tejun Heo <tj@kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: ACPI/cpu hotplug: possible lockdep
Date: Wed, 30 Jul 2014 15:12:49 +0200	[thread overview]
Message-ID: <1956231.f1vFNp0Nyx@vostro.rjw.lan> (raw)
In-Reply-To: <53D88C5B.4060302@cn.fujitsu.com>

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();


  reply	other threads:[~2014-07-30 12:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-30  6:10 Gu Zheng
2014-07-30 13:12 ` Rafael J. Wysocki [this message]
2014-07-31  7:44   ` Gu Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1956231.f1vFNp0Nyx@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=guz.fnst@cn.fujitsu.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®