From: Andrew Morton <akpm@linux-foundation.org>
To: Johannes Stezenbach <js@sig21.net>
Cc: rjw@sisk.pl, linux-kernel@vger.kernel.org, davej@redhat.com,
pavel@ucw.cz, linux-acpi@vger.kernel.org, lenb@kernel.org,
venkatesh.pallipadi@intel.com, arjan@infradead.org,
tglx@linutronix.de
Subject: Re: 2.6.30: hibernation/swsusp lockup due to acpi-cpufreq
Date: Tue, 16 Jun 2009 11:55:40 -0700 [thread overview]
Message-ID: <20090616115540.ceb67a30.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090616142217.GA5548@sig21.net>
On Tue, 16 Jun 2009 16:22:17 +0200
Johannes Stezenbach <js@sig21.net> wrote:
> Fix swsusp failure on !SMP
>
> Commit 01599fca6758d2cd133e78f87426fc851c9ea725 introduced
> a regression which caused a backtrace on suspend and
> a hang on resume on a Thinkpad T42p (Pentium M CPU).
>
> Signed-off-by: Johannes Stezenbach <js@sig21.net>
>
>
> --- linux-2.6.30/kernel/up.c.orig 2009-06-16 15:56:28.000000000 +0200
> +++ linux-2.6.30/kernel/up.c 2009-06-16 15:57:27.000000000 +0200
> @@ -10,11 +10,13 @@
> int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
> int wait)
> {
> + unsigned long flags;
> +
> WARN_ON(cpu != 0);
>
> - local_irq_disable();
> + local_irq_save(flags);
> (func)(info);
> - local_irq_enable();
> + local_irq_restore(flags);
>
> return 0;
> }
ok, what's going on here? The patch implies that someone (presumably
acpi-cpufreq) is calling smp_call_function_single() with local
interrupts disabled. That's a bug on SMP kernels. And it'll generate
a trace if it happens:
/* Can deadlock when called with interrupts disabled */
WARN_ON_ONCE(irqs_disabled() && !oops_in_progress);
but nobody has reported such a trace AFAIK?
Also, prior to 01599fca6758d2cd133e78f87426fc851c9ea725, acpi-cpufreq
was using work_on_cpu(). If it was calling work_on_cpu() with local
interrupts disabled then that would have been a bug too, which could
generate might_sleep() or scheduling-while-atomic warnings.
Because it is a bug to call the SMP version of
smp_call_function_single() with local interrupts disabled, I don't
think we should need to apply the above patch.
But I don't know what we _should_ do because I don't know what the bug
is. Are you able to get us a copy of that stack trace?
next prev parent reply other threads:[~2009-06-16 18:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-15 23:27 2.6.30: hibernation/swsusp lockup due to acpi-cpufreq Johannes Stezenbach
2009-06-16 0:16 ` Rafael J. Wysocki
2009-06-16 14:22 ` Johannes Stezenbach
2009-06-16 18:55 ` Andrew Morton [this message]
2009-06-16 19:57 ` Johannes Stezenbach
2009-06-16 20:25 ` Pallipadi, Venkatesh
2009-06-16 20:40 ` Johannes Stezenbach
2009-06-16 21:09 ` Andrew Morton
2009-06-16 21:18 ` Pallipadi, Venkatesh
2009-06-16 21:39 ` Rafael J. Wysocki
2009-06-16 22:44 ` Johannes Stezenbach
2009-06-16 20:44 ` Johannes Stezenbach
[not found] <cNtMS-6Iq-11@gated-at.bofh.it>
[not found] ` <cNuzd-7VN-3@gated-at.bofh.it>
[not found] ` <cNHPT-3kB-1@gated-at.bofh.it>
[not found] ` <cNM3f-1ty-29@gated-at.bofh.it>
[not found] ` <cNMZg-2ZR-17@gated-at.bofh.it>
[not found] ` <cNNsg-3U5-3@gated-at.bofh.it>
[not found] ` <cNNLx-4kf-5@gated-at.bofh.it>
[not found] ` <cNOeG-5cB-23@gated-at.bofh.it>
[not found] ` <cNOok-5pJ-11@gated-at.bofh.it>
[not found] ` <cNOy0-5C5-23@gated-at.bofh.it>
2009-07-04 18:09 ` Michael Witten
2009-07-04 21:29 ` Rafael J. Wysocki
2009-07-06 21:20 ` Pallipadi, Venkatesh
2009-07-06 21:39 ` Rafael J. Wysocki
2009-07-06 22:16 ` Pallipadi, Venkatesh
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=20090616115540.ceb67a30.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=davej@redhat.com \
--cc=js@sig21.net \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
--cc=tglx@linutronix.de \
--cc=venkatesh.pallipadi@intel.com \
/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