Re: WARNING: at fs/sysfs/dir.c:451 sysfs_add_one: sysfs: cannotcreate duplicate filename '/devices/pci0000:00/0000:00:01.0/slot'

From: Alex Chiang
Date: Wed Apr 14 2010 - 08:55:15 EST


* Greg KH <gregkh@xxxxxxx>:
> On Tue, Apr 13, 2010 at 07:33:34PM -0600, Alex Chiang wrote:
> > * Eric Paris <eparis@xxxxxxxxxx>:
> > >
> > > I get one for 1.0, 1.1, 1.2, 2.0, 3.0, 4.0, 5.0. Below I only show the
> > > example for 1.0. Attached should be the full dmesg and config. Please
> > > let me know about any ideas, tests, questions, or things I can do to
> > > help debug the spew....
> >
> > These come from a patch I wrote, but unfortunately, I don't have
> > the time or hardware to properly debug them. :(
>
> It should be simple, for any dynamically allocated sysfs attribute, just
> call sysfs_attribute_initialize() before registering it with the sysfs
> core, and you will get rid of these messages.

Oh hm, I didn't realize that.

> If you have a pointer to your patch, I'll be glad to generate an add-on
> patch to resolve this issue.

In Jesse's linux-next branch:

commit 8b9cd07e02d69bb9e746a57fc987643d648c4b13
Author: Alex Chiang <achiang@xxxxxx>
Date: Mon Mar 8 10:24:29 2010 -0700

PCI: create function symlinks in /sys/bus/pci/slots/N/

Thanks Greg.

/ac

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/