lkml.org 
[lkml]   [2008]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PCI] duplicate sysfs symbols getting registered in current git
On Mon, Feb 25, 2008 at 01:43:29PM +0100, Guennadi Liakhovetski wrote:
> On Tue, 19 Feb 2008, Greg KH wrote:
>
> > On Mon, Feb 18, 2008 at 09:52:25PM +0100, Guennadi Liakhovetski wrote:
> > > Booting an x86 SMP PC with todays git-snapshot or just with 2.6.25-rc2
> > > getting the following warnings (with a bit of context):
> >
> > Can you try enabling CONFIG_DEBUG_KOBJECT and sending the output at boot
> > time from this?
>
> dmesg output with CONFIG_LOG_BUF_SHIFT=19 sent privately to Greg as
> unpacked, as it would have to be sent to the list, is 408K big. Will see
> what Greg says.

Thanks for the log, it helped out a lot. I'm thinking that you have
CONFIG_SYSFS_DEPRECATED set to Y, right? If so, can you set it to N
(hopefully you have a new userspace to handle that)?

I think we're trying to add a file with the same name as the device
object for the pci bus, which is wierd, because the namespace issues
should keep this from happening.

That being said, this warning really scares me:

kobject (c7c35900): tried to init an initialized object, something is seriously wrong.
Pid: 1, comm: swapper Not tainted 2.6.25-rc2-testpm #30
[<c01ea0e9>] kobject_init+0x89/0x90
[<c025094e>] device_initialize+0x1e/0x90
[<c025119b>] device_register+0xb/0x20
[<c01f3fd8>] pci_bus_add_devices+0x98/0x140
[<c030aff7>] ? pcibios_scan_root+0x27/0xa0
[<c03f69d0>] pci_legacy_init+0x50/0xf0
[<c03db5c2>] kernel_init+0x132/0x310
[<c010303a>] ? ret_from_fork+0x6/0x1c
[<c03db490>] ? kernel_init+0x0/0x310
[<c03db490>] ? kernel_init+0x0/0x310
[<c0103d3f>] kernel_thread_helper+0x7/0x18
=======================
We did just find a problem in the kobject core that might be causing
this to happen, can you try the patch below to see if this causes it to
go away as well?

thanks,

greg k-h

------------------
From: Greg Kroah-Hartman <gregkh@suse.de>
Subject: kobject: properly initialize ksets
kset_initialize was calling kobject_init_internal() which didn't
initialize the kobject as well as kobject_init() was. So have
kobject_init() call kobject_init_internal() and move the logic to
initalize the kobject there.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
lib/kobject.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -153,6 +153,10 @@ static void kobject_init_internal(struct
return;
kref_init(&kobj->kref);
INIT_LIST_HEAD(&kobj->entry);
+ kobj->state_in_sysfs = 0;
+ kobj->state_add_uevent_sent = 0;
+ kobj->state_remove_uevent_sent = 0;
+ kobj->state_initialized = 1;
}


@@ -289,13 +293,8 @@ void kobject_init(struct kobject *kobj,
dump_stack();
}

- kref_init(&kobj->kref);
- INIT_LIST_HEAD(&kobj->entry);
+ kobject_init_internal(kobj);
kobj->ktype = ktype;
- kobj->state_in_sysfs = 0;
- kobj->state_add_uevent_sent = 0;
- kobj->state_remove_uevent_sent = 0;
- kobj->state_initialized = 1;
return;

error:

\
 
 \ /
  Last update: 2008-02-26 21:15    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site