[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171107102450.lgaujtc7f3dftvvb@wfg-t540p.sh.intel.com>
Date: Tue, 7 Nov 2017 18:24:50 +0800
From: Fengguang Wu <fengguang.wu@...el.com>
To: linux-spi@...r.kernel.org
Cc: Mark Brown <broonie@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: [butterfly_attach] WARNING: CPU: 0 PID: 198 at fs/sysfs/dir.c:31
sysfs_warn_dup+0x71/0x97
Hello,
FYI this happens in v4.14-rc8 -- it's not necessarily a new bug.
[ 13.021710] power_supply test_battery: prop SERIAL_NUMBER=4.14.0-rc8
[ 13.022381] power_supply test_battery: prop TEMP=26
[ 13.022902] power_supply test_battery: prop VOLTAGE_NOW=3300
[ 13.141240] sysfs: cannot create duplicate filename '/devices/pnp0/00:04/spi_master/spi42'
[ 13.142495] ------------[ cut here ]------------
[ 13.143284] WARNING: CPU: 0 PID: 198 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x71/0x97
[ 13.144700] Modules linked in: aesni_intel crypto_simd input_leds led_class i6300esb(+) virtio_pci(+) parport_pc(+) piix(+)
[ 13.145973] CPU: 0 PID: 198 Comm: udevd Not tainted 4.14.0-rc8 #74
[ 13.146637] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
[ 13.147536] task: ffff880015184000 task.stack: ffff880015188000
[ 13.148196] RIP: 0010:sysfs_warn_dup+0x71/0x97
[ 13.148674] RSP: 0018:ffff88001518b800 EFLAGS: 00010286
[ 13.149267] RAX: 000000000000004e RBX: ffff88001530a000 RCX: 0000000000000000
[ 13.176178] RDX: 0000004e00000001 RSI: 0000000000000000 RDI: 0000000000000296
[ 13.176990] RBP: ffff88001edf20d0 R08: ffff880015184718 R09: 000000004df60586
[ 13.177819] R10: ffffffff8230dbcc R11: 0000000000000002 R12: ffff880015311398
[ 13.178585] R13: 0000000000000000 R14: ffff8800152ab020 R15: ffff88001518b910
[ 13.179329] FS: 00007f4be5e6e780(0000) GS:ffffffff81e86000(0000) knlGS:0000000000000000
[ 13.198352] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 13.198996] CR2: 00007fe166ff63a0 CR3: 0000000015168000 CR4: 00000000000406b0
[ 13.199758] Call Trace:
[ 13.200072] sysfs_create_dir_ns+0xcf/0xef
[ 13.200638] kobject_add_internal+0x14c/0x43d
[ 13.201291] kobject_add+0xbe/0xdf
[ 13.201696] device_add+0x155/0x6f0
[ 13.202074] ? __lockdep_init_map+0x180/0x1df
[ 13.202566] spi_register_controller+0x21b/0x618
[ 13.203077] spi_bitbang_start+0x14f/0x173
[ 13.203587] butterfly_attach+0x179/0x303
[ 13.204025] ? butterfly_txrx_word_mode0+0x141/0x141
[ 13.204591] ? dead_read+0xd/0xd
[ 13.204956] driver_check+0x25/0x2f
[ 13.205338] bus_for_each_drv+0x7c/0xca
[ 13.205797] parport_announce_port+0x122/0x174
[ 13.206665] parport_pc_probe_port+0x987/0xabb [parport_pc]
[ 13.207397] ? ftrace_likely_update+0x35/0x4f
[ 13.207867] parport_pc_pnp_probe+0x19c/0x2dc [parport_pc]
[ 13.208473] pnp_device_probe+0xbd/0xe9
[ 13.208893] ? match_device+0x53/0x53
[ 13.209359] driver_probe_device+0x1d6/0x45c
[ 13.209949] ? driver_probe_device+0x45c/0x45c
[ 13.255454] general protection fault: 0000 [#1]
[ 13.255457] Modules linked in: mtd_dataflash(+) mtd aesni_intel crypto_simd input_leds led_class i6300esb(+) virtio_pci(+) parport_pc(+) piix(+)
[ 13.255475] CPU: 0 PID: 200 Comm: udevd Not tainted 4.14.0-rc8 #74
[ 13.255477] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
[ 13.255480] task: ffff8800151aa000 task.stack: ffff8800151b0000
[ 13.255488] RIP: 0010:butterfly_chipselect+0x7a/0x96
[ 13.255490] RSP: 0018:ffff8800151b3820 EFLAGS: 00010296
[ 13.255495] RAX: dead4ead00000001 RBX: 0000000000000008 RCX: 0000000000000001
[ 13.255499] RDX: ffff880000397960 RSI: 0000000000000001 RDI: ffff880015312008
[ 13.255502] RBP: ffff8800152a99b0 R08: ffff8800151aa788 R09: 00000000dc965af9
[ 13.255506] R10: ffff8800151b38d0 R11: 0000000000000002 R12: ffff880015312008
[ 13.255510] R13: ffff880015312008 R14: ffff8800153124f0 R15: ffff8800153124f0
[ 13.255515] FS: 00007f4be5e6e780(0000) GS:ffffffff81e86000(0000) knlGS:0000000000000000
[ 13.255518] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 13.255522] CR2: 00007fe166ff63a0 CR3: 00000000151a2000 CR4: 00000000000406b0
[ 13.255528] Call Trace:
[ 13.255537] spi_bitbang_set_cs+0x4f/0x5d
[ 13.255543] ? bitbang_txrx_8+0xc7/0xc7
[ 13.255551] spi_set_cs+0xad/0xb6
[ 13.255557] spi_transfer_one_message+0x42/0x4b5
[ 13.255565] ? spi_bitbang_unprepare_hardware+0x32/0x32
[ 13.255572] __spi_pump_messages+0x83a/0x85d
[ 13.255579] ? do_raw_spin_unlock+0xc3/0xec
[ 13.255585] __spi_sync+0x1f3/0x265
[ 13.255594] spi_sync+0x33/0x52
[ 13.255600] spi_write_then_read+0x1c4/0x236
[ 13.255609] ? spi_finalize_current_transfer+0x1b/0x1b
[ 13.255624] ? dataflash_probe+0x50/0x4d2 [mtd_dataflash]
[ 13.255628] ? spi_write_then_read+0x5/0x236
[ 13.255632] dataflash_probe+0x50/0x4d2 [mtd_dataflash]
[ 13.255637] spi_drv_probe+0x6e/0x9f
[ 13.255642] ? spi_drv_remove+0x52/0x52
[ 13.255646] driver_probe_device+0x1d6/0x45c
[ 13.255652] ? driver_probe_device+0x45c/0x45c
[ 13.255657] __driver_attach+0xa9/0xda
[ 13.255665] bus_for_each_dev+0x84/0xc0
[ 13.255673] bus_add_driver+0x10a/0x22f
[ 13.255677] driver_register+0xe5/0x12b
[ 13.255680] ? 0xffffffffa002f000
[ 13.255683] do_one_initcall+0xad/0x1c1
[ 13.255689] ? ftrace_likely_update+0x35/0x4f
[ 13.255695] ? do_init_module+0x1f/0x414
[ 13.255699] ? __kmalloc+0x8e/0x1b5
[ 13.255707] do_init_module+0x56/0x414
[ 13.255714] load_module+0xd34/0x1238
[ 13.255728] ? SyS_finit_module+0x81/0x8c
[ 13.255735] SyS_finit_module+0x81/0x8c
[ 13.255746] entry_SYSCALL_64_fastpath+0x1e/0xad
[ 13.255749] RIP: 0033:0x7f4be55434a9
[ 13.255751] RSP: 002b:00007ffcc162ef28 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[ 13.255755] RAX: ffffffffffffffda RBX: 0000000000653240 RCX: 00007f4be55434a9
[ 13.255758] RDX: 0000000000000000 RSI: 00007f4be580f0aa RDI: 0000000000000008
[ 13.255760] RBP: 00007f4be580f0aa R08: 0000000000000000 R09: 000000000064eee0
[ 13.255762] R10: 0000000000000008 R11: 0000000000000246 R12: 0000000000000000
[ 13.255765] R13: 0000000000020000 R14: 0000000000000000 R15: 000000000064eee0
[ 13.255769] Code: e0 00 00 00 48 8b 10 88 d8 ee 88 9d f0 00 00 00 bb 08 00 00 00 e8 68 b3 9e ff 48 8b 95 e0 00 00 00 48 8b 82 d0 04 00 00 48 8b 12 <48> 8b 88 80 06 00 00 83 c2 02 8a 01 83 e0 f7 31 d8 22 41 01 ee
[ 13.255843] RIP: butterfly_chipselect+0x7a/0x96 RSP: ffff8800151b3820
[ 13.255848] ---[ end trace 6dc77b4ba8d89cf1 ]---
[ 13.255852] Kernel panic - not syncing: Fatal exception
In another boot, it also triggers a NULL pointer dereference:
[ 12.380513] parport0: PC-style at 0x378, irq 7 [PCSPP(,...)]
[ 12.380773] parport0: powerup/reset Butterfly
[ 12.418376] power_supply test_battery: prop VOLTAGE_NOW=3300
[ 12.530099] sysfs: cannot create duplicate filename '/devices/pnp0/00:04/spi_master/spi42'
[ 12.530828] ------------[ cut here ]------------
[ 12.531216] WARNING: CPU: 0 PID: 176 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x71/0x97
[ 12.531953] Modules linked in: input_leds led_class parport_pc(+) i6300esb(+) virtio_pci(+) piix(+)
[ 12.532713] CPU: 0 PID: 176 Comm: udevd Not tainted 4.14.0-rc8 #74
[ 12.533213] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
[ 12.533892] task: ffff880015184000 task.stack: ffff880015188000
[ 12.534384] RIP: 0010:sysfs_warn_dup+0x71/0x97
[ 12.534749] RSP: 0018:ffff88001518b800 EFLAGS: 00010286
[ 12.535177] RAX: 000000000000004e RBX: ffff88001531f000 RCX: 0000000000000000
[ 12.535754] RDX: 0000004e00000001 RSI: 0000000000000000 RDI: 0000000000000296
[ 12.536328] RBP: ffff88001531e1c0 R08: ffff880015184718 R09: 000000004df60586
[ 12.536906] R10: ffffffff8230dbcc R11: 0000000000000002 R12: ffff880015349d80
[ 12.537485] R13: 0000000000000000 R14: ffff880015305020 R15: ffff88001518b910
[ 12.538061] FS: 00007f0e39bfb780(0000) GS:ffffffff81e86000(0000) knlGS:0000000000000000
[ 12.538713] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 12.539179] CR2: 00007fdba45f3110 CR3: 0000000015162000 CR4: 00000000000006b0
[ 12.539758] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 12.571852] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 12.572455] Call Trace:
[ 12.572672] sysfs_create_dir_ns+0xcf/0xef
[ 12.573018] kobject_add_internal+0x14c/0x43d
[ 12.573387] kobject_add+0xbe/0xdf
[ 12.573683] device_add+0x155/0x6f0
[ 12.573976] ? __lockdep_init_map+0x180/0x1df
[ 12.574345] spi_register_controller+0x21b/0x618
[ 12.574728] spi_bitbang_start+0x14f/0x173
[ 12.575068] butterfly_attach+0x179/0x303
[ 12.575412] ? butterfly_txrx_word_mode0+0x141/0x141
[ 12.575818] ? dead_read+0xd/0xd
[ 12.576088] driver_check+0x25/0x2f
[ 12.576384] bus_for_each_drv+0x7c/0xca
[ 12.576706] parport_announce_port+0x122/0x174
[ 12.577077] parport_pc_probe_port+0x987/0xabb [parport_pc]
[ 12.577542] ? ftrace_likely_update+0x35/0x4f
[ 12.577907] parport_pc_pnp_probe+0x19c/0x2dc [parport_pc]
[ 12.578360] pnp_device_probe+0xbd/0xe9
[ 12.578679] ? match_device+0x53/0x53
[ 12.579032] driver_probe_device+0x1d6/0x45c
[ 12.579388] ? driver_probe_device+0x45c/0x45c
[ 12.579754] __driver_attach+0xa9/0xda
[ 12.613810] bus_for_each_dev+0x84/0xc0
[ 12.614156] bus_add_driver+0x10a/0x22f
[ 12.614494] driver_register+0xe5/0x12b
[ 12.614821] parport_pc_init+0x392/0xeff [parport_pc]
[ 12.615244] ? parport_parse_param+0x101/0x101 [parport_pc]
[ 12.615799] do_one_initcall+0xad/0x1c1
[ 12.616124] ? ftrace_likely_update+0x35/0x4f
[ 12.616497] ? do_init_module+0x1f/0x414
[ 12.616826] ? __kmalloc+0x8e/0x1b5
[ 12.617126] do_init_module+0x56/0x414
[ 12.617449] load_module+0xd34/0x1238
[ 12.617779] ? SyS_finit_module+0x81/0x8c
[ 12.618123] SyS_finit_module+0x81/0x8c
[ 12.618461] entry_SYSCALL_64_fastpath+0x1e/0xad
[ 12.618843] RIP: 0033:0x7f0e392d04a9
[ 12.619141] RSP: 002b:00007fff96a27288 EFLAGS: 00000206 ORIG_RAX: 0000000000000139
[ 12.619760] RAX: ffffffffffffffda RBX: 00007f0e39bfad01 RCX: 00007f0e392d04a9
[ 12.631813] BUG: unable to handle kernel NULL pointer dereference at 0000000000000680
[ 12.631834] IP: butterfly_chipselect+0x7a/0x96
[ 12.631837] PGD 151a6067 P4D 151a6067 PUD 151a7067 PMD 0
[ 12.631852] Oops: 0000 [#1]
[ 12.631857] Modules linked in: mtd_dataflash(+) mtd input_leds led_class parport_pc(+) i6300esb(+) virtio_pci(+) piix(+)
[ 12.632536] CPU: 0 PID: 178 Comm: udevd Not tainted 4.14.0-rc8 #74
[ 12.632541] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
[ 12.632546] task: ffff8800151b0000 task.stack: ffff8800151b4000
[ 12.632555] RIP: 0010:butterfly_chipselect+0x7a/0x96
[ 12.632560] RSP: 0018:ffff8800151b7820 EFLAGS: 00010296
[ 12.632567] RAX: 0000000000000000 RBX: 0000000000000008 RCX: 0000000000000001
[ 12.632572] RDX: ffff880015306978 RSI: 0000000000000001 RDI: ffff8800153589a8
[ 12.632577] RBP: ffff8800152ca9b0 R08: ffff8800151b0788 R09: 000000006ea8a446
[ 12.632582] R10: ffff8800151b78d0 R11: 0000000000000002 R12: ffff8800153589a8
[ 12.632587] R13: ffff8800153589a8 R14: ffff880015358e90 R15: ffff880015358e90
[ 12.632595] FS: 00007f0e39bfb780(0000) GS:ffffffff81e86000(0000) knlGS:0000000000000000
[ 12.632600] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 12.632605] CR2: 0000000000000680 CR3: 00000000151a5000 CR4: 00000000000006b0
[ 12.632614] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 12.632619] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 12.632621] Call Trace:
[ 12.632634] spi_bitbang_set_cs+0x4f/0x5d
[ 12.632643] ? bitbang_txrx_8+0xc7/0xc7
[ 12.632653] spi_set_cs+0xad/0xb6
[ 12.632663] spi_transfer_one_message+0x42/0x4b5
[ 12.632673] ? spi_bitbang_unprepare_hardware+0x32/0x32
[ 12.632682] __spi_pump_messages+0x83a/0x85d
[ 12.632693] ? do_raw_spin_unlock+0xc3/0xec
[ 12.632702] __spi_sync+0x1f3/0x265
[ 12.632715] spi_sync+0x33/0x52
[ 12.632724] spi_write_then_read+0x1c4/0x236
[ 12.632737] ? spi_finalize_current_transfer+0x1b/0x1b
[ 12.632761] ? dataflash_probe+0x50/0x4d2 [mtd_dataflash]
[ 12.632768] ? spi_write_then_read+0x5/0x236
[ 12.632777] dataflash_probe+0x50/0x4d2 [mtd_dataflash]
[ 12.632789] spi_drv_probe+0x6e/0x9f
[ 12.632799] ? spi_drv_remove+0x52/0x52
[ 12.632807] driver_probe_device+0x1d6/0x45c
[ 12.632816] ? driver_probe_device+0x45c/0x45c
[ 12.632824] __driver_attach+0xa9/0xda
[ 12.632836] bus_for_each_dev+0x84/0xc0
[ 12.632848] bus_add_driver+0x10a/0x22f
[ 12.632856] driver_register+0xe5/0x12b
[ 12.632862] ? 0xffffffffa002f000
[ 12.632870] do_one_initcall+0xad/0x1c1
[ 12.632882] ? ftrace_likely_update+0x35/0x4f
[ 12.632893] ? do_init_module+0x1f/0x414
[ 12.632900] ? __kmalloc+0x8e/0x1b5
[ 12.632911] do_init_module+0x56/0x414
[ 12.632922] load_module+0xd34/0x1238
[ 12.632943] ? SyS_finit_module+0x81/0x8c
[ 12.632952] SyS_finit_module+0x81/0x8c
[ 12.632967] entry_SYSCALL_64_fastpath+0x1e/0xad
[ 12.632973] RIP: 0033:0x7f0e392d04a9
[ 12.632978] RSP: 002b:00007fff96a27288 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[ 12.632986] RAX: ffffffffffffffda RBX: 0000000000650630 RCX: 00007f0e392d04a9
[ 12.632991] RDX: 0000000000000000 RSI: 00007f0e3959c0aa RDI: 0000000000000008
[ 12.632996] RBP: 00007f0e3959c0aa R08: 0000000000000000 R09: 0000000000647240
[ 12.633001] R10: 0000000000000008 R11: 0000000000000246 R12: 0000000000000000
[ 12.633006] R13: 0000000000020000 R14: 0000000000000000 R15: 0000000000647240
[ 12.633015] Code: e0 00 00 00 48 8b 10 88 d8 ee 88 9d f0 00 00 00 bb 08 00 00 00 e8 68 b3 9e ff 48 8b 95 e0 00 00 00 48 8b 82 d0 04 00 00 48 8b 12 <48> 8b 88 80 06 00 00 83 c2 02 8a 01 83 e0 f7 31 d8 22 41 01 ee
[ 12.633159] RIP: butterfly_chipselect+0x7a/0x96 RSP: ffff8800151b7820
[ 12.633162] CR2: 0000000000000680
[ 12.633171] ---[ end trace 31cfc6226eb0f0e9 ]---
[ 12.633175] Kernel panic - not syncing: Fatal exception
Attached the full dmesg and kconfig.
Thanks,
Fengguang
View attachment "dmesg-vm-kbuild-yocto-x86_64-50:20171107014327:x86_64-randconfig-ne0-11070041:4.14.0-rc8:74" of type "text/plain" (57777 bytes)
View attachment ".config" of type "text/plain" (103205 bytes)
Powered by blists - more mailing lists