Bug 210749

Summary: sysfs: cannot create duplicate filename '/bus/nvmem/devices/module-vpd'
Product: Platform Specific/Hardware Reporter: Erhard F. (erhard_f)
Component: PPC-64Assignee: platform_ppc-64
Status: RESOLVED OBSOLETE    
Severity: normal CC: lagarcia, michael
Priority: P1    
Hardware: PPC-64   
OS: Linux   
Kernel Version: 5.10.1 Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg (kernel 5.10.1, Talos II)
kernel .config (kernel 5.10.1, Talos II)
dmesg (kernel 5.9.16, Talos II)
dmesg (kernel 5.11-rc1, Talos II)
dmesg (kernel 5.12-rc1, Talos II)
kernel .config (kernel 5.12-rc1, Talos II)
dmesg (kernel 5.14-rc1 w. 61f764c307f6, 4e302c3b568e reverted, Talos II)
kernel .config (kernel 5.14-rc1, Talos II)

Description Erhard F. 2020-12-17 12:12:53 UTC
Created attachment 294193 [details]
dmesg (kernel 5.10.1, Talos II)

[...]
sysfs: cannot create duplicate filename '/bus/nvmem/devices/module-vpd'
CPU: 4 PID: 349 Comm: systemd-udevd Not tainted 5.10.1-gentoo-TalosII #1
Call Trace:
[c00000001b93eb70] [c0000000007ea2c8] .dump_stack+0xe4/0x13c (unreliable)
[c00000001b93ec10] [c0000000004d63a8] .sysfs_warn_dup+0x78/0xb0
[c00000001b93eca0] [c0000000004d69ec] .sysfs_do_create_link_sd.isra.0+0x13c/0x150
[c00000001b93ed40] [c0000000008be3a0] .bus_add_device+0x80/0x190
[c00000001b93edd0] [c0000000008b8f2c] .device_add+0x41c/0x990
[c00000001b93eea0] [c000000000952f28] .nvmem_register+0x1f8/0xae0
[c00000001b93ef90] [c00000000095385c] .devm_nvmem_register+0x4c/0xb0
[c00000001b93f020] [c008000006de8c7c] .at24_probe+0x67c/0x8a0 [at24]
[c00000001b93f2a0] [c00000000091cfa8] .i2c_device_probe+0x158/0x3c0
[c00000001b93f330] [c0000000008bfd04] .really_probe+0x134/0x500
[c00000001b93f3e0] [c0000000008c02f8] .driver_probe_device+0x78/0x110
[c00000001b93f460] [c0000000008c06bc] .device_driver_attach+0xbc/0xf0
[c00000001b93f4f0] [c0000000008c0768] .__driver_attach+0x78/0x140
[c00000001b93f580] [c0000000008bcbac] .bus_for_each_dev+0x9c/0x120
[c00000001b93f630] [c0000000008bf404] .driver_attach+0x24/0x40
[c00000001b93f6a0] [c0000000008be958] .bus_add_driver+0x1c8/0x2a0
[c00000001b93f740] [c0000000008c1158] .driver_register+0x88/0x190
[c00000001b93f7c0] [c00000000091e068] .i2c_register_driver+0x58/0xc0
[c00000001b93f840] [c008000006de8ff4] .at24_init+0x5c/0x70 [at24]
[c00000001b93f8b0] [c00000000001135c] .do_one_initcall+0x7c/0x490
[c00000001b93f9a0] [c0000000001d1fac] .do_init_module+0x6c/0x2e0
[c00000001b93fa30] [c0000000001d50e0] .load_module+0x2c80/0x3450
[c00000001b93fc40] [c0000000001d5b28] .__do_sys_finit_module+0xc8/0x120
[c00000001b93fd70] [c000000000037ab0] .system_call_exception+0x160/0x2b0
[c00000001b93fe20] [c00000000000cbe0] system_call_common+0xf0/0x27c
at24: probe of 1-0050 failed with error -17
at24 2-0050: probe
sysfs: cannot create duplicate filename '/bus/nvmem/devices/module-vpd'
CPU: 4 PID: 349 Comm: systemd-udevd Not tainted 5.10.1-gentoo-TalosII #1
Call Trace:
[c00000001b93eb70] [c0000000007ea2c8] .dump_stack+0xe4/0x13c (unreliable)
[c00000001b93ec10] [c0000000004d63a8] .sysfs_warn_dup+0x78/0xb0
[c00000001b93eca0] [c0000000004d69ec] .sysfs_do_create_link_sd.isra.0+0x13c/0x150
[c00000001b93ed40] [c0000000008be3a0] .bus_add_device+0x80/0x190
[c00000001b93edd0] [c0000000008b8f2c] .device_add+0x41c/0x990
[c00000001b93eea0] [c000000000952f28] .nvmem_register+0x1f8/0xae0
[c00000001b93ef90] [c00000000095385c] .devm_nvmem_register+0x4c/0xb0
[c00000001b93f020] [c008000006de8c7c] .at24_probe+0x67c/0x8a0 [at24]
[c00000001b93f2a0] [c00000000091cfa8] .i2c_device_probe+0x158/0x3c0
[c00000001b93f330] [c0000000008bfd04] .really_probe+0x134/0x500
[c00000001b93f3e0] [c0000000008c02f8] .driver_probe_device+0x78/0x110
[c00000001b93f460] [c0000000008c06bc] .device_driver_attach+0xbc/0xf0
[c00000001b93f4f0] [c0000000008c0768] .__driver_attach+0x78/0x140
[c00000001b93f580] [c0000000008bcbac] .bus_for_each_dev+0x9c/0x120
[c00000001b93f630] [c0000000008bf404] .driver_attach+0x24/0x40
[c00000001b93f6a0] [c0000000008be958] .bus_add_driver+0x1c8/0x2a0
[c00000001b93f740] [c0000000008c1158] .driver_register+0x88/0x190
[c00000001b93f7c0] [c00000000091e068] .i2c_register_driver+0x58/0xc0
[c00000001b93f840] [c008000006de8ff4] .at24_init+0x5c/0x70 [at24]
[c00000001b93f8b0] [c00000000001135c] .do_one_initcall+0x7c/0x490
[c00000001b93f9a0] [c0000000001d1fac] .do_init_module+0x6c/0x2e0
[c00000001b93fa30] [c0000000001d50e0] .load_module+0x2c80/0x3450
[c00000001b93fc40] [c0000000001d5b28] .__do_sys_finit_module+0xc8/0x120
[c00000001b93fd70] [c000000000037ab0] .system_call_exception+0x160/0x2b0
[c00000001b93fe20] [c00000000000cbe0] system_call_common+0xf0/0x27c
at24: probe of 2-0050 failed with error -17
at24 3-0050: probe
[...]

 # inxi -b --no-host
System:    Kernel: 5.10.1-gentoo-TalosII ppc64 bits: 64 Console: tty 1 
           Distro: Gentoo Base System release 2.7 
Machine:   Type: PowerPC Device System: T2P9D01 REV 1.01 details: PowerNV T2P9D01 REV 1.01 
           rev: 2.2 (pvr 004e 1202) 
CPU:       Info: 32-Core POWER9 altivec supported [MCP] speed: 2170 MHz min/max: 2154/3800 MHz 
Graphics:  Device-1: AMD Turks XT [Radeon HD 6670/7670] driver: radeon v: kernel 
           Device-2: ASPEED Graphics Family driver: N/A 
           Display: server: X.org 1.20.10 driver: ati,radeon unloaded: fbdev,modesetting tty: 104x53 
           Message: Advanced graphics data unavailable in console for root. 
Network:   Device-1: Broadcom and subsidiaries NetXtreme BCM5719 Gigabit Ethernet PCIe driver: tg3 
           Device-2: Broadcom and subsidiaries NetXtreme BCM5719 Gigabit Ethernet PCIe driver: tg3 
Drives:    Local Storage: total: 447.13 GiB used: 16.64 GiB (3.7%) 
Info:      Processes: 445 Uptime: 11m Memory: 62.75 GiB used: 1.89 GiB (3.0%) Init: systemd 
           runlevel: 5 Shell: Bash inxi: 3.1.06
Comment 1 Erhard F. 2020-12-17 12:13:27 UTC
Created attachment 294195 [details]
kernel .config (kernel 5.10.1, Talos II)
Comment 2 Erhard F. 2020-12-22 06:51:44 UTC
Created attachment 294285 [details]
dmesg (kernel 5.9.16, Talos II)

Hmm... does not seem to happen on kernel 5.9.x.
Comment 3 Erhard F. 2020-12-31 15:50:20 UTC
Created attachment 294449 [details]
dmesg (kernel 5.11-rc1, Talos II)
Comment 4 Erhard F. 2021-03-03 21:20:39 UTC
Created attachment 295619 [details]
dmesg (kernel 5.12-rc1, Talos II)

Same for 5.12-rc1.

[...]
at24 0-0050: probe
at24 0-0050: 65536 byte 24c512 EEPROM, writable, 1 bytes/write
at24 1-0050: probe
sysfs: cannot create duplicate filename '/bus/nvmem/devices/module-vpd'
CPU: 23 PID: 378 Comm: systemd-udevd Not tainted 5.12.0-rc1-TalosII #2
Call Trace:
[c0000000283a6ae0] [c00000000083649c] .dump_stack+0xf8/0x16c (unreliable)
[c0000000283a6b80] [c00000000051e628] .sysfs_warn_dup+0x78/0xb0
[c0000000283a6c10] [c00000000051ec6c] .sysfs_do_create_link_sd.isra.0+0x13c/0x150
[c0000000283a6cb0] [c000000000912b90] .bus_add_device+0x80/0x190
[c0000000283a6d40] [c00000000090ef18] .device_add+0x438/0xaa0
[c0000000283a6e60] [c0000000009dff90] .nvmem_register+0x2a0/0xc00
[c0000000283a6f50] [c0000000009e093c] .devm_nvmem_register+0x4c/0xb0
[c0000000283a6fe0] [c008000006a4427c] .at24_probe+0x67c/0x8a0 [at24]
[c0000000283a7270] [c0000000009a90f8] .i2c_device_probe+0x158/0x3c0
[c0000000283a7300] [c0000000009144f4] .really_probe+0x134/0x500
[c0000000283a73b0] [c000000000914938] .driver_probe_device+0x78/0x110
[c0000000283a7430] [c000000000914eac] .device_driver_attach+0xbc/0xf0
[c0000000283a74c0] [c000000000914f58] .__driver_attach+0x78/0x140
[c0000000283a7550] [c00000000091139c] .bus_for_each_dev+0x9c/0x120
[c0000000283a7600] [c000000000913bf4] .driver_attach+0x24/0x40
[c0000000283a7670] [c000000000913148] .bus_add_driver+0x1c8/0x2a0
[c0000000283a7710] [c000000000915948] .driver_register+0x88/0x190
[c0000000283a7790] [c0000000009aa2d8] .i2c_register_driver+0x58/0xc0
[c0000000283a7810] [c008000006a445f4] .at24_init+0x5c/0x70 [at24]
[c0000000283a7880] [c0000000000110ac] .do_one_initcall+0x7c/0x480
[c0000000283a7970] [c0000000001f4c3c] .do_init_module+0x6c/0x2f0
[c0000000283a7a00] [c0000000001f7dcc] .load_module+0x2ccc/0x34a0
[c0000000283a7c20] [c0000000001f8818] .__do_sys_finit_module+0xc8/0x120
[c0000000283a7d50] [c000000000037194] .system_call_exception+0x1b4/0x3b0
[c0000000283a7e10] [c00000000000c8dc] system_call_common+0xec/0x278
--- interrupt: c00 at 0x3fffa40f78b4
NIP:  00003fffa40f78b4 LR: 00003fffa42d8b04 CTR: 0000000000000000
REGS: c0000000283a7e80 TRAP: 0c00   Not tainted  (5.12.0-rc1-TalosII)
MSR:  900000000280f032 <SF,HV,VEC,VSX,EE,PR,FP,ME,IR,DR,RI>  CR: 48222242  XER: 00000000
IRQMASK: 0 
 GPR00: 0000000000000161 00003fffd30fb260 00003fffa41d1300 000000000000000f 
 GPR04: 00003fffa42e4630 0000000000000000 000000000000000f 0000000000000000 
 GPR08: 0000000000000002 0000000000000000 0000000000000000 0000000000000000 
 GPR12: 0000000000000000 00003fffa46fc810 0000000000020000 00003fffd30fb738 
 GPR16: 00000000000f4240 0000000000000000 0000000000000000 0000000000000000 
 GPR20: 000000015f2623a0 0000000000000000 00003fffa45e01b8 00003fffa45e0178 
 GPR24: 000000015f23d0e0 00003fffa45e0158 0000000000020000 000000015f1a4150 
 GPR28: 00003fffa42e4630 0000000000020000 0000000000000000 000000015f2623a0 
NIP [00003fffa40f78b4] 0x3fffa40f78b4
LR [00003fffa42d8b04] 0x3fffa42d8b04
--- interrupt: c00
at24: probe of 1-0050 failed with error -17
at24 2-0050: probe
sysfs: cannot create duplicate filename '/bus/nvmem/devices/module-vpd'
[...]
Comment 5 Erhard F. 2021-03-03 21:21:24 UTC
Created attachment 295621 [details]
kernel .config (kernel 5.12-rc1, Talos II)
Comment 6 Michael Ellerman 2021-03-04 10:31:30 UTC
Looks like: 61f764c307f6 ("eeprom: at24: Support custom device names for AT24 EEPROMs")
Comment 7 Michael Ellerman 2021-03-04 11:44:50 UTC
Yeah, reverting that on mainline fixed it.

Not sure how we're going to fix it though, a straight revert isn't going to be acceptable I suspect.
Comment 8 Michael Ellerman 2021-03-04 11:56:44 UTC
Actually I also reverted 4e302c3b568e ("misc: eeprom: at24: fix NVMEM name with custom AT24 device name").
Comment 9 Erhard F. 2021-07-14 19:03:01 UTC
Created attachment 297867 [details]
dmesg (kernel 5.14-rc1 w. 61f764c307f6, 4e302c3b568e reverted, Talos II)

Yes, I can confirm reverting 61f764c307f6 and 4e302c3b568e works. Tested on kernel 5.14-rc1.
Comment 10 Erhard F. 2021-07-14 19:03:46 UTC
Created attachment 297869 [details]
kernel .config (kernel 5.14-rc1, Talos II)
Comment 11 Erhard F. 2022-02-03 17:33:47 UTC
Have not seen this on kernels 5.15.x and 5.16.x.

Closing as obsolete.