From: Greg KH <gregkh@suse.de>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>,
Andrew Morton <akpm@linux-foundation.org>,
Alexey Dobriyan <adobriyan@sw.ru>,
linux-kernel@vger.kernel.org
Subject: Re: EIP is at device_shutdown+0x32/0x60
Date: Thu, 15 Nov 2007 10:18:34 -0800 [thread overview]
Message-ID: <20071115181834.GE24531@suse.de> (raw)
In-Reply-To: <3ae72650711150950k74fdb37eu108bb360a594ffe8@mail.gmail.com>
On Thu, Nov 15, 2007 at 06:50:06PM +0100, Kay Sievers wrote:
> On Nov 15, 2007 5:34 PM, Greg KH <gregkh@suse.de> wrote:
> > On Thu, Nov 15, 2007 at 09:55:34PM +0900, Yasunori Goto wrote:
> > > > On Thu, 15 Nov 2007 12:11:58 +0300 Alexey Dobriyan <adobriyan@sw.ru> wrote:
> > > >
> > > > > Three boxes rarely oops during reboot or poweroff with 2.6.24-rc2-mm1
> > > > > (1) and during 2.6.24 cycle (2):
> > > > >
> > > > > kernel_restart
> > > > > sys_reboot
> > > > > [garbage]
> > > > > Code: 8b 88 a8 00 00 00 85 c9 74 04 89
> > > > > EIP is at device_shutdown+0x32/0x60
> > > >
> > > > Yes, all my test boxes did that - it's what I referred to in the releaee
> > > > notes. Greg is pondering the problem - seem he's the only person who
> > > > cannot reproduce it ;)
> > >
> > > Fortunately, my ia64 box reproduces this oops "every time".
> > > So, I could chase it.
> > >
> > > device_shutdown() function in drivers/base/power/shutdown.c
> > > is followings.
> > > -----------
> > > /**
> > > * device_shutdown - call ->shutdown() on each device to shutdown.
> > > */
> > > void device_shutdown(void)
> > > {
> > > struct device * dev, *devn;
> > >
> > > list_for_each_entry_safe_reverse(dev, devn, &devices_kset->list,
> > > kobj.entry) {
> > > if (dev->bus && dev->bus->shutdown) {
> > > dev_dbg(dev, "shutdown\n");
> > > dev->bus->shutdown(dev);
> > > } else if (dev->driver && dev->driver->shutdown) {
> > > dev_dbg(dev, "shutdown\n");
> > > dev->driver->shutdown(dev);
> > > }
> > > }
> > > }
> > > --------
> > > When oops occured, dev->driver pointed kset_ktype's address,
> > > and dev->driver->shutdown was the address of bus_type_list.
> > > So, Oops was caused by "Illegal operation fault".
> > > kset_ktypes is pointed by system_kset.
> > >
> > > If my understanding is correct, this loop can't distinguish between
> > > struct device and struct kset, but both are connected in this list,
> > > right? It may be the cause of this.
> >
> > Hm, no, it should just be a list of devices for the kset, but I'll go
> > verify that this is correct.
>
> Care to try this:
> + system_kset = kset_create_and_register("system", NULL,
> + &devices_kset->kobj, NULL);
>
> We should not join the kset, only use it as a parent.
ARGH!
<snip loads of curse words...>
that should do it, let me go test.
Actually, once that is changed, the whole kset_create_and_register can
drop that last argument, we never want to create a kset as part of
another one...
The kset's kobject should not belong to any kset at all, I really messed
that one up.
Yet another reason why this patchset really matters, this crap isn't
even understood well by the people trying to maintain it...
greg k-h
next prev parent reply other threads:[~2007-11-15 18:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-15 9:11 EIP is at device_shutdown+0x32/0x60 Alexey Dobriyan
2007-11-15 9:44 ` Andrew Morton
2007-11-15 9:59 ` Alexey Dobriyan
2007-11-15 12:55 ` Yasunori Goto
2007-11-15 13:15 ` Cornelia Huck
2007-11-15 16:34 ` Greg KH
2007-11-15 17:07 ` Mark Lord
2007-11-15 18:23 ` Greg KH
2007-11-15 18:29 ` Mark Lord
2007-11-15 18:48 ` Greg KH
2007-11-15 19:13 ` Mark Lord
2007-11-15 17:50 ` Kay Sievers
2007-11-15 18:18 ` Greg KH [this message]
2007-11-15 19:01 ` Greg KH
2007-11-16 1:13 ` Yasunori Goto
2007-11-16 1:22 ` Greg KH
2007-11-19 9:55 ` Cornelia Huck
2007-11-15 14:40 ` Jeff Dike
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=20071115181834.GE24531@suse.de \
--to=gregkh@suse.de \
--cc=adobriyan@sw.ru \
--cc=akpm@linux-foundation.org \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=y-goto@jp.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.