From: Thomas Gleixner <tglx@linutronix.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>, Ingo Molnar <mingo@elte.hu>,
LKML <linux-kernel@vger.kernel.org>,
John Stultz <johnstul@us.ibm.com>,
linux-acpi@vger.kernel.org
Subject: Re: [patch 3/3] clockevents: Fix resume logic - updated version
Date: Sat, 12 May 2007 13:44:13 +0200 [thread overview]
Message-ID: <1178970253.22481.143.camel@localhost.localdomain> (raw)
In-Reply-To: <20070512030754.90488f79.akpm@linux-foundation.org>
On Sat, 2007-05-12 at 03:07 -0700, Andrew Morton wrote:
> On Sat, 12 May 2007 11:18:09 +0200 Thomas Gleixner <tglx@linutronix.de> wrote:
>
> > > It's peculiar that the hang happens when acpi_evaluate_object() hits its
> > > return statement. Any theories there?
> >
> > Only stack or memory corruption come into mind, but I have no clue how
> > this is related to the resume logic changes.
>
> So I had the brilliant idea of turning on some kernel debugging. It's
> a shame that CONFIG_SOFTWARE_SUSPEND disables CONFIG_DEBUG_PAGEALLOC.
Really brilliant. I tried to reproduce your problem and stumbled across
something else.
tglx
------------------------------->
Subject: clocksource fix lock order in the resume path
lockdep complains about the lock nesting of clocksource and watchdog
lock in the resume path. Move watchdog resume out of the clocksource
lock.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Index: linux-2.6.21/kernel/time/clocksource.c
===================================================================
--- linux-2.6.21.orig/kernel/time/clocksource.c
+++ linux-2.6.21/kernel/time/clocksource.c
@@ -151,9 +151,11 @@ static void clocksource_watchdog(unsigne
}
static void clocksource_resume_watchdog(void)
{
- spin_lock(&watchdog_lock);
+ unsigned long flags;
+
+ spin_lock_irqsave(&watchdog_lock, flags);
watchdog_resumed = 1;
- spin_unlock(&watchdog_lock);
+ spin_unlock_irqrestore(&watchdog_lock, flags);
}
static void clocksource_check_watchdog(struct clocksource *cs)
@@ -224,9 +226,9 @@ void clocksource_resume(void)
cs->resume();
}
- clocksource_resume_watchdog();
-
spin_unlock_irqrestore(&clocksource_lock, flags);
+
+ clocksource_resume_watchdog();
}
/**
next prev parent reply other threads:[~2007-05-12 11:41 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070430102837.748238000@linutronix.de>
[not found] ` <20070430102851.987296000@linutronix.de>
2007-05-07 6:43 ` [patch 2/3] ACPI: Keep TSC stable, when lapic_timer_c2_ok is set Andrew Morton
2007-05-07 7:01 ` Thomas Gleixner
[not found] ` <20070430102852.042964000@linutronix.de>
[not found] ` <20070505003421.00ec45ba.akpm@linux-foundation.org>
[not found] ` <20070505115127.GA17815@elte.hu>
[not found] ` <1178463784.31213.46.camel@localhost.localdomain>
[not found] ` <20070508225920.258d8d34.akpm@linux-foundation.org>
2007-05-09 7:10 ` [patch 3/3] clockevents: Fix resume logic - updated version Andrew Morton
2007-05-09 8:18 ` Thomas Gleixner
2007-05-09 8:22 ` Andrew Morton
2007-05-09 8:31 ` Andrew Morton
2007-05-09 8:59 ` Thomas Gleixner
2007-05-09 11:45 ` Rafael J. Wysocki
2007-05-09 12:24 ` Thomas Gleixner
2007-05-09 13:12 ` Rafael J. Wysocki
2007-05-09 13:19 ` Thomas Gleixner
2007-05-09 17:09 ` Rafael J. Wysocki
2007-05-09 17:15 ` Thomas Gleixner
2007-05-09 18:36 ` Rafael J. Wysocki
2007-05-09 20:45 ` Thomas Gleixner
2007-05-09 20:53 ` Rafael J. Wysocki
2007-05-09 21:26 ` Thomas Gleixner
2007-05-10 8:46 ` Andrew Morton
2007-05-10 8:55 ` Thomas Gleixner
2007-05-10 9:18 ` Andrew Morton
2007-05-10 9:27 ` Thomas Gleixner
2007-05-10 20:12 ` Rafael J. Wysocki
2007-05-11 16:47 ` Andrew Morton
2007-05-11 20:10 ` Rafael J. Wysocki
2007-05-11 20:28 ` Andrew Morton
2007-05-11 21:02 ` Rafael J. Wysocki
2007-05-11 21:09 ` Rafael J. Wysocki
2007-05-12 6:56 ` Andrew Morton
2007-05-12 8:46 ` Thomas Gleixner
2007-05-12 9:00 ` Andrew Morton
2007-05-12 9:18 ` Thomas Gleixner
2007-05-12 10:07 ` Andrew Morton
2007-05-12 11:44 ` Thomas Gleixner [this message]
2007-05-12 16:51 ` Andrew Morton
2007-05-12 17:01 ` Thomas Gleixner
2007-05-12 17:23 ` Andrew Morton
2007-05-12 19:36 ` Thomas Gleixner
2007-05-12 19:56 ` Thomas Gleixner
2007-05-13 1:11 ` Andrew Morton
2007-05-13 8:07 ` Thomas Gleixner
2007-05-13 16:48 ` Thomas Gleixner
2007-05-13 19:09 ` Andrew Morton
2007-05-13 20:07 ` Ingo Molnar
2007-05-13 22:35 ` Andrew Morton
2007-05-12 18:49 ` Thomas Gleixner
2007-05-12 11:52 ` Thomas Gleixner
2007-05-15 16:52 ` Pavel Machek
2007-05-13 16:12 ` Thomas Gleixner
2007-05-14 6:42 ` Andrew Morton
2007-05-14 6:58 ` Thomas Gleixner
2007-05-09 12:52 ` Rafael J. Wysocki
2007-05-09 17:14 ` Andrew Morton
2007-05-09 18:55 ` Rafael J. Wysocki
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=1178970253.22481.143.camel@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=johnstul@us.ibm.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rjw@sisk.pl \
/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