public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Andrew Morton <akpm@osdl.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.19-rc5-mm2 (end earlier): WARNING at lib/kobject.c:172 kobject_init() on resume from disk
Date: Wed, 22 Nov 2006 16:39:35 -0800	[thread overview]
Message-ID: <20061123003935.GA1679@kroah.com> (raw)
In-Reply-To: <20061122134406.f3a30fc4.akpm@osdl.org>

On Wed, Nov 22, 2006 at 01:44:06PM -0800, Andrew Morton wrote:
> On Wed, 22 Nov 2006 22:07:06 +0100
> "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> 
> > Hi,
> > 
> > I get similar traces on every resume from disk on SMP systems:
> > 
> > WARNING at lib/kobject.c:172 kobject_init()
> > 
> > Call Trace:
> >  [<ffffffff80265559>] dump_trace+0xaa/0x3fd
> >  [<ffffffff802658e8>] show_trace+0x3c/0x52
> >  [<ffffffff80265913>] dump_stack+0x15/0x17
> >  [<ffffffff8031c1ad>] kobject_init+0x3f/0x8a
> >  [<ffffffff8031c298>] kobject_register+0x1a/0x3e
> >  [<ffffffff8038e5b4>] sysdev_register+0x5f/0xec
> >  [<ffffffff8026af39>] mce_create_device+0x79/0x103
> >  [<ffffffff8026afed>] mce_cpu_callback+0x2a/0xbd
> >  [<ffffffff8026112f>] notifier_call_chain+0x29/0x3e
> >  [<ffffffff8028e809>] raw_notifier_call_chain+0x9/0xb
> >  [<ffffffff80299f18>] _cpu_up+0xc2/0xd5
> >  [<ffffffff80299f56>] cpu_up+0x2b/0x42
> >  [<ffffffff80299fbb>] enable_nonboot_cpus+0x4e/0x9b
> >  [<ffffffff802a35da>] snapshot_ioctl+0x1a0/0x5d2
> >  [<ffffffff8023d9cd>] do_ioctl+0x5e/0x77
> >  [<ffffffff8022d785>] vfs_ioctl+0x256/0x273
> >  [<ffffffff8024770b>] sys_ioctl+0x5f/0x82
> >  [<ffffffff8025811e>] system_call+0x7e/0x83
> > DWARF2 unwinder stuck at system_call+0x7e/0x83
> > Leftover inexact backtrace:
> > 
> > False positive?
> > 
> 
> Don't know.  The changelog in
> http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/gregkh-01-driver/kobject-warn.patch
> is pretty pathetic.

Heh, I would think that it's a big "obvious", oh well.

There are 2 changes in this patch.

First one is to ensure that the kobject is properly initialized _before_
kobject_init() is called.  Yeah, seems funny, right?  Turns out this has
caught a lot of issues where kobject_init() is called twice on the same
object, not a good thing at all.

And this looks like that is exactly what is happening here, as you
mention:

> Perhaps mce_remove_device() isn't being called.

That's probably the issue.

The second change in that patch tries to enforce the "everything needs a
release() function" rule for kobjects, but it turns out, a lot of static
kobjects trigger this inproperly (struct bus and friends), so that can't
go to mainline, and it only shows up if you enable CONFIG_KOBJECT_DEBUG.

Hope this helps explain things, I'll go off and edit the text there to
make it clearer.

thanks,

greg k-h

  reply	other threads:[~2006-11-23  3:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-22 21:07 2.6.19-rc5-mm2 (end earlier): WARNING at lib/kobject.c:172 kobject_init() on resume from disk Rafael J. Wysocki
2006-11-22 21:44 ` Andrew Morton
2006-11-23  0:39   ` Greg KH [this message]
2006-11-23 13:07     ` Rafael J. Wysocki
2006-11-25 22:20   ` Rafael J. Wysocki
2006-11-25 23:15     ` Rafael J. Wysocki
2006-11-25 23:43       ` Greg KH
2006-11-26 11:11         ` Rafael J. Wysocki
2006-11-26 19:29           ` Andi Kleen

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=20061123003935.GA1679@kroah.com \
    --to=greg@kroah.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --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