From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755510AbWKWDlf (ORCPT ); Wed, 22 Nov 2006 22:41:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755519AbWKWDlf (ORCPT ); Wed, 22 Nov 2006 22:41:35 -0500 Received: from mail.kroah.org ([69.55.234.183]:31971 "EHLO perch.kroah.org") by vger.kernel.org with ESMTP id S1755510AbWKWDld (ORCPT ); Wed, 22 Nov 2006 22:41:33 -0500 Date: Wed, 22 Nov 2006 16:39:35 -0800 From: Greg KH To: Andrew Morton Cc: "Rafael J. Wysocki" , LKML Subject: Re: 2.6.19-rc5-mm2 (end earlier): WARNING at lib/kobject.c:172 kobject_init() on resume from disk Message-ID: <20061123003935.GA1679@kroah.com> References: <200611222207.07143.rjw@sisk.pl> <20061122134406.f3a30fc4.akpm@osdl.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061122134406.f3a30fc4.akpm@osdl.org> User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.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" wrote: > > > Hi, > > > > I get similar traces on every resume from disk on SMP systems: > > > > WARNING at lib/kobject.c:172 kobject_init() > > > > Call Trace: > > [] dump_trace+0xaa/0x3fd > > [] show_trace+0x3c/0x52 > > [] dump_stack+0x15/0x17 > > [] kobject_init+0x3f/0x8a > > [] kobject_register+0x1a/0x3e > > [] sysdev_register+0x5f/0xec > > [] mce_create_device+0x79/0x103 > > [] mce_cpu_callback+0x2a/0xbd > > [] notifier_call_chain+0x29/0x3e > > [] raw_notifier_call_chain+0x9/0xb > > [] _cpu_up+0xc2/0xd5 > > [] cpu_up+0x2b/0x42 > > [] enable_nonboot_cpus+0x4e/0x9b > > [] snapshot_ioctl+0x1a0/0x5d2 > > [] do_ioctl+0x5e/0x77 > > [] vfs_ioctl+0x256/0x273 > > [] sys_ioctl+0x5f/0x82 > > [] 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