Bug 16090 - sysfs: cannot create duplicate filename
Summary: sysfs: cannot create duplicate filename
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: PCI (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_pci@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks: 16055
  Show dependency tree
 
Reported: 2010-06-01 15:59 UTC by Tobias
Modified: 2010-06-21 18:53 UTC (History)
7 users (show)

See Also:
Kernel Version: 2.6.35-rc1
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
lspci -vv output on 2.6.34 (83.66 KB, text/plain)
2010-06-07 10:50 UTC, Michael S. Tsirkin
Details
.config for 3.6.35-rc2 (broken) (77.52 KB, application/octet-stream)
2010-06-07 10:51 UTC, Michael S. Tsirkin
Details

Description Tobias 2010-06-01 15:59:49 UTC
No idea what I am looking at here, but I spot sysfs. 

[    2.654836] ------------[ cut here ]------------
[    2.654846] WARNING: at fs/sysfs/dir.c:451 sysfs_add_one+0xc5/0x130()
[    2.654848] Hardware name: MacBook2,1
[    2.654850] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:1c.1/0000:02:00.0/slot'
[    2.654852] Modules linked in:
[    2.654856] Pid: 1, comm: swapper Not tainted 2.6.35-rc1 #1
[    2.654858] Call Trace:
[    2.654866]  [<ffffffff8108a8aa>] warn_slowpath_common+0x7a/0xb0
[    2.654870]  [<ffffffff8108a981>] warn_slowpath_fmt+0x41/0x50
[    2.654873]  [<ffffffff811c80e5>] sysfs_add_one+0xc5/0x130
[    2.654877]  [<ffffffff811c878b>] sysfs_do_create_link+0x13b/0x190
[    2.654881]  [<ffffffff811c87fe>] sysfs_create_link+0xe/0x10
[    2.654886]  [<ffffffff81480706>] pci_create_sysfs_dev_files+0x3d6/0x5f0
[    2.654891]  [<ffffffff82624db8>] ? pci_sysfs_init+0x0/0x51
[    2.654894]  [<ffffffff82624db8>] ? pci_sysfs_init+0x0/0x51
[    2.654897]  [<ffffffff82624dd7>] pci_sysfs_init+0x1f/0x51
[    2.654900]  [<ffffffff82624b94>] ? pci_resource_alignment_sysfs_init+0x0/0x19
[    2.654905]  [<ffffffff81002047>] do_one_initcall+0x37/0x1a0
[    2.654910]  [<ffffffff825f977c>] kernel_init+0x171/0x1fb
[    2.654915]  [<ffffffff8103bd24>] kernel_thread_helper+0x4/0x10
[    2.654919]  [<ffffffff825f960b>] ? kernel_init+0x0/0x1fb
[    2.654923]  [<ffffffff8103bd20>] ? kernel_thread_helper+0x0/0x10
[    2.654926] ---[ end trace 273ba1e8361c6959 ]---

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:07.0 Performance counters: Intel Corporation Device 27a3 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
01:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 22)
02:00.0 Network controller: Atheros Communications Inc. AR5008 Wireless Network Adapter (rev 01)
03:03.0 FireWire (IEEE 1394): Agere Systems FW322/323 (rev 61)
Comment 1 Greg Kroah-Hartman 2010-06-01 18:15:04 UTC
This is a pci core bug, not a sysfs one.
Comment 2 Michael S. Tsirkin 2010-06-07 10:49:07 UTC
I see this in 2.6.35-rc2 as well.
2.6.34 is fine.
Comment 3 Michael S. Tsirkin 2010-06-07 10:50:34 UTC
Created attachment 26680 [details]
lspci -vv output on 2.6.34
Comment 4 Michael S. Tsirkin 2010-06-07 10:51:58 UTC
Created attachment 26681 [details]
.config for 3.6.35-rc2 (broken)
Comment 5 Michael S. Tsirkin 2010-06-07 10:52:38 UTC
backtrace for me looks slightly different:

------------[ cut here ]------------
WARNING: at fs/sysfs/dir.c:451 sysfs_add_one+0xc9/0x130()
Hardware name: X8DTN
sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:1c.4/0000:0a:00.0/slot'
Modules linked in:
Pid: 1, comm: swapper Not tainted 2.6.35-rc2-mst-debug #8
Call Trace:
 [<ffffffff8105ed2f>] warn_slowpath_common+0x7f/0xc0
 [<ffffffff8105ee26>] warn_slowpath_fmt+0x46/0x50
 [<ffffffff811ad249>] sysfs_add_one+0xc9/0x130
 [<ffffffff811ad9d8>] sysfs_do_create_link+0xd8/0x1a0
 [<ffffffff811adad3>] sysfs_create_link+0x13/0x20
 [<ffffffff812353a6>] pci_create_sysfs_dev_files+0x3d6/0x5f0
 [<ffffffff81c74b0f>] ? pci_sysfs_init+0x0/0x51
 [<ffffffff81c74b0f>] ? pci_sysfs_init+0x0/0x51
 [<ffffffff81c74b2e>] pci_sysfs_init+0x1f/0x51
 [<ffffffff81c748e0>] ? pci_resource_alignment_sysfs_init+0x0/0x19
 [<ffffffff8100204c>] do_one_initcall+0x3c/0x1d0
 [<ffffffff81c458c1>] kernel_init+0x2b6/0x346
 [<ffffffff8100be84>] kernel_thread_helper+0x4/0x10
 [<ffffffff81c4560b>] ? kernel_init+0x0/0x346
 [<ffffffff8100be80>] ? kernel_thread_helper+0x0/0x10
---[ end trace 50015d47e04d483e ]---
  Magic number: 14:612:577
Comment 6 Michael S. Tsirkin 2010-06-07 10:54:00 UTC
Note: unsurprisingly, since the failing device is the disk, it fails to boot:
0a:00.0 IDE interface: JMicron Technology Corp. JMB368 IDE controller
Comment 7 Michael S. Tsirkin 2010-06-07 10:54:57 UTC
items from grub menu.lst: nothing special in kernel parameters:


title Red Hat Enterprise Linux (2.6.34-mst-debug)
        root (hd0,0)
        kernel /vmlinuz-2.6.34-mst-debug ro root=/dev/mapper/vg_virtlab16-lv_root rd_LVM_LV=vg_virtlab16/lv_root rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us console=tty console=ttyS0,115200,n8 crashkernel=auto
        initrd /initramfs-2.6.34-mst-debug.img

title Red Hat Enterprise Linux (2.6.35-rc2-mst-debug)
        root (hd0,0)
        kernel /vmlinuz-2.6.35-rc2-mst-debug ro root=/dev/mapper/vg_virtlab16-lv_root rd_LVM_LV=vg_virtlab16/lv_root rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us console=tty console=ttyS0,115200,n8 crashkernel=auto
Comment 8 Michael S. Tsirkin 2010-06-07 10:56:14 UTC
also reported here:
http://lkml.org/lkml/2010/6/6/196
Comment 9 Jesse Barnes 2010-06-07 16:13:19 UTC
does reverting this commit resolve the problem?

commit 75568f8094eb0333e9c2109b23cbc8b82d318a3c
Author: Alex Chiang <achiang@hp.com>
Date:   Mon Mar 8 10:24:29 2010 -0700

    PCI: create function symlinks in /sys/bus/pci/slots/N/
Comment 10 Tobias 2010-06-07 17:48:31 UTC
I did a

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6

and git revert 75568f8094eb0333e9c2109b23cbc8b82d318a3c, followed by my usual build routine.

The resulting kernel doesn't show that error on boot anymore.
Comment 11 Rafael J. Wysocki 2010-06-08 22:02:53 UTC
Handled-By : Jesse Barnes <jbarnes@virtuousgeek.org>
Comment 12 Brian Bloniarz 2010-06-14 14:05:05 UTC
Please test 2.6.35-rc3, the patch you mention should be reverted:

Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Fri Jun 11 13:08:37 2010 -0700

    Revert "PCI: create function symlinks in /sys/bus/pci/slots/N/"
    
    This reverts commit 75568f8094eb0333e9c2109b23cbc8b82d318a3c.
    
    Since they're just a convenience anyway, remove these symlinks since
    they're causing duplicate filename errors in the wild.
    
    Acked-by: Alex Chiang <achiang@canonical.com>
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Comment 13 Brian Bloniarz 2010-06-14 14:06:23 UTC
Sorry, the commit id:
commit 3be434f0244ee059432f92de7e891ee514f41738
Comment 14 Michael S. Tsirkin 2010-06-14 20:19:45 UTC
-rc3 is fine.
Comment 15 Jesse Barnes 2010-06-14 20:28:24 UTC
Thanks for confirming.

Note You need to log in before you can comment on or make changes to this bug.