From: Greg KH <gregkh@suse.de>
To: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, Frans Pop <elendil@planet.nl>,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [2.6.25-rc1] System no longer powers off after shutdown
Date: Thu, 14 Feb 2008 22:57:46 -0800 [thread overview]
Message-ID: <20080215065746.GA8916@suse.de> (raw)
In-Reply-To: <86802c440802141538m44d64b6as827426174874979d@mail.gmail.com>
On Thu, Feb 14, 2008 at 03:38:13PM -0800, Yinghai Lu wrote:
> On Wed, Feb 13, 2008 at 8:58 AM, Greg KH <gregkh@suse.de> wrote:
> >
> > On Wed, Feb 13, 2008 at 12:39:13PM +0100, Frans Pop wrote:
> > > On Tuesday 12 February 2008, Greg KH wrote:
> > > > On Tue, Feb 12, 2008 at 09:39:14PM +0100, Frans Pop wrote:
> > > > > On Monday 11 February 2008, Frans Pop wrote:
> > > > > > In general 2.6.25 if looking quite good on my desktop, but there's
> > > > > > one important issue: the system no longer powers off after shutdown.
> > > > > > This works fine with 2.6.24.
> > > > >
> > > > > Don't ask me why, but bisection shows this commit to be the cause of
> > > > > the failure to power off:
> > > > > commit c10997f6575f476ff38442fa18fd4a0d80345f9d
> > > > > Author: Greg Kroah-Hartman <gregkh@suse.de>
> > > > > Date: Thu Dec 20 08:13:05 2007 -0800
> > > > >
> > > > > Kobject: convert drivers/* from kobject_unregister() to
> > > > > kobject_put()
> > > > >
> > > > > Because it seemed somewhat unlikely, I have double checked this by
> > > > > doing an extra compilation for this commit and its predecessor.
> > > >
> > > > What is the symptom of not powering off?
> > >
> > > I already noticed yesterday that there's one hunk in that commit that's not
> > > a straight replacement:
> > > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> > > index 9e102af..5efd555 100644
> > > --- a/drivers/cpufreq/cpufreq.c
> > > +++ b/drivers/cpufreq/cpufreq.c
> > > @@ -1030,8 +1030,6 @@ static int __cpufreq_remove_dev (struct sys_device * sys_dev)
> > >
> > > unlock_policy_rwsem_write(cpu);
> > >
> > > - kobject_unregister(&data->kobj);
> > > -
> > > kobject_put(&data->kobj);
> > >
> > > /* we need to make sure that the underlying kobj is actually
> > >
> > >
> > > So, just on the off chance, I applied the patch below and bingo, the system
> > > powers off again. I doubt this will be the correct solution, but just in
> > > case it is, here's my signed off. A comment why the double put is needed
> > > would probably be good though.
> >
> > There is a bug in the cpufreq kref logic that makes this "double put"
> > necessary. A real fix has already been posted to solve this issue, and
> > I think it should be on it's way to Linus for -rc2 already.
> >
> > Please let me know if -rc2 comes out without this needed fix.
>
> after disable cpufreq, i got
>
> ACPI: Preparing to enter system sleep state S5
> Disabling non-boot CPUs ...
> kvm: disabling virtualization on CPU1
> CPU 1 is now offline
> CPU1 is down
> kvm: disabling virtualization on CPU2
> CPU 2 is now offline
> ================> hang here.
>
> but x86.git/mm could go through down all the cpus....
>
> interesting...
I swear someone sent this patch in before. Can you try this one below,
there seems to be an imbalance with kobject_get and _put.
thanks,
greg k-h
---
drivers/cpufreq/cpufreq.c | 8 --------
1 file changed, 8 deletions(-)
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1006,14 +1006,6 @@ static int __cpufreq_remove_dev (struct
}
#endif
-
- if (!kobject_get(&data->kobj)) {
- spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
- cpufreq_debug_enable_ratelimit();
- unlock_policy_rwsem_write(cpu);
- return -EFAULT;
- }
-
#ifdef CONFIG_SMP
#ifdef CONFIG_HOTPLUG_CPU
next prev parent reply other threads:[~2008-02-15 6:54 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-11 15:23 [2.6.25-rc0 System no longer powers off after shutdown Frans Pop
2008-02-12 20:39 ` [2.6.25-rc1] " Frans Pop
2008-02-12 20:56 ` Greg KH
2008-02-12 21:45 ` Frans Pop
2008-02-13 7:54 ` Andrew Morton
2008-02-13 8:23 ` Jeff Chua
2008-02-13 9:24 ` Frans Pop
2008-02-13 11:39 ` Frans Pop
2008-02-13 16:58 ` Greg KH
2008-02-13 18:55 ` Rafael J. Wysocki
2008-02-15 6:59 ` Greg KH
2008-02-15 8:52 ` Jeff Chua
2008-02-15 21:00 ` Greg KH
2008-02-13 19:28 ` Frans Pop
2008-02-14 23:38 ` Yinghai Lu
2008-02-14 23:48 ` Ingo Molnar
2008-02-15 0:06 ` Yinghai Lu
2008-02-15 2:14 ` Yinghai Lu
2008-02-15 3:45 ` Yinghai Lu
2008-02-15 6:52 ` Greg KH
2008-02-15 8:41 ` Yinghai Lu
2008-02-15 20:58 ` Greg KH
2008-02-15 6:57 ` Greg KH [this message]
2008-02-15 10:19 ` Frans Pop
2008-02-15 19:38 ` Yinghai Lu
2008-02-15 20:31 ` Yinghai Lu
2008-02-15 20:58 ` Greg KH
2008-02-15 20:58 ` Greg KH
2008-02-13 8:41 ` [2.6.25-rc1] jerky mouse cursor and randoooom key repeats Frans Pop
2008-02-15 23:58 ` Pavel Machek
2008-02-16 1:23 ` Gabriel C
2008-02-16 6:19 ` Mike Galbraith
2008-02-16 10:09 ` Gabriel C
2008-02-16 14:03 ` Mike Galbraith
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=20080215065746.GA8916@suse.de \
--to=gregkh@suse.de \
--cc=elendil@planet.nl \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=yhlu.kernel@gmail.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