lk 4.7 regression: EDAC, amd64_edac: Drop pci_register_driver() use

From: Tony Battersby
Date: Wed Jun 15 2016 - 16:52:06 EST


The following commit is causing an oops:

3f37a36b6282 ("EDAC, amd64_edac: Drop pci_register_driver() use")

The oops happens when I "modprobe amd64_edac_mod" on an Intel
Xeon-based system, or when booting the same system with amd64_edac
built-in. Obviously the module is not meant for this hardware, but it
tries to load anyway and then oopses.

My kernel config enables SLUB debugging + KASAN + UBSAN with gcc 6.1.

==================================================================
BUG: KASAN: slab-out-of-bounds in edac_pci_create_generic_ctl+0x2ea/0x370 at addr ffff8802ccb00c80
Write of size 8 by task modprobe/1482
=============================================================================
BUG kmalloc-128 (Not tainted): kasan: bad access detected
-----------------------------------------------------------------------------

Disabling lock debugging due to kernel taint
INFO: Allocated in 0xffff8802ccb00cb8 age=18446744073709530075 cpu=2168654862 pid=-1
ghes_probe+0x220/0xbf0
___slab_alloc+0x665/0xa60
__slab_alloc+0x3e/0x70
kmem_cache_alloc+0x141/0x1f0
ghes_probe+0x220/0xbf0
platform_drv_probe+0x7c/0x190
driver_probe_device+0x1f8/0x780
__driver_attach+0x15a/0x1d0
bus_for_each_dev+0x121/0x1e0
driver_attach+0x3d/0x70
bus_add_driver+0x2d7/0x690
driver_register+0x1a4/0x3c0
__platform_driver_register+0xd2/0x120
ghes_init+0x190/0x2f1
do_one_initcall+0x98/0x250
kernel_init_freeable+0x3ff/0x499
INFO: Freed in 0xffff8cb7 age=18446740465937001439 cpu=0 pid=0
umh_complete+0x51/0x70
__slab_free+0x327/0x580
kfree+0x1a0/0x2b0
umh_complete+0x51/0x70
call_usermodehelper_exec_async+0x3d4/0x4f0
ret_from_fork+0x1f/0x40
INFO: Slab 0xffffea000b32c000 objects=35 used=35 fp=0x (null) flags=0x4000000000004080
INFO: Object 0xffff8802ccb00ae0 @offset=2784 fp=0xcccccccccccccccc

Redzone ffff8802ccb00ad8: 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZ
Object ffff8802ccb00ae0: cc cc cc cc cc cc cc cc d8 ea 89 01 00 c9 ff ff ................
Object ffff8802ccb00af0: f8 9e 74 cb 02 88 ff ff 00 00 00 00 00 00 00 00 ..t.............
Object ffff8802ccb00b00: 00 00 00 00 00 00 00 00 00 c7 51 82 ff ff ff ff ..........Q.....
Object ffff8802ccb00b10: 00 c7 51 82 ff ff ff ff 00 00 00 00 00 00 00 00 ..Q.............
Object ffff8802ccb00b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Object ffff8802ccb00b30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Object ffff8802ccb00b40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Object ffff8802ccb00b50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Redzone ffff8802ccb00b60: 00 00 00 00 00 00 00 00 ........
Padding ffff8802ccb00ca0: b6 8c ff ff 00 00 00 00 ........
CPU: 8 PID: 1482 Comm: modprobe Tainted: G B 4.7.0-rc3-00009-gdb06d75 #1
Hardware name: Supermicro X8DTH-i/6/iF/6F/X8DTH, BIOS 2.1b 05/04/12
0000000000000000 ffff8802c64b7758 ffffffff809e6b11 0000000041b58ab3
ffffffff818fbccf ffffffff809e6a5e ffffffff8190f3bb ffff8802ccb00ae0
00000000000001c8 ffff8802d10074c0 ffff8802c64b7758 ffffffff805f32a3
Call Trace:
[<ffffffff809e6b11>] dump_stack+0xb3/0x112
[<ffffffff809e6a5e>] ? _atomic_dec_and_lock+0xce/0xce
[<ffffffff805f32a3>] ? print_section+0x53/0xa0
[<ffffffff805f616e>] print_trailer+0x16e/0x2d0
[<ffffffff805fa35f>] object_err+0x2f/0x40
[<ffffffff80601699>] kasan_report_error+0x2e9/0x8b0
[<ffffffff81081b69>] ? edac_pci_alloc_ctl_info+0x129/0x170
[<ffffffff81082a0a>] ? edac_pci_create_generic_ctl+0x2ea/0x370
[<ffffffff80602034>] __asan_report_store8_noabort+0x54/0x70
[<ffffffff81082a0a>] ? edac_pci_create_generic_ctl+0x2ea/0x370
[<ffffffff81082a0a>] edac_pci_create_generic_ctl+0x2ea/0x370
[<ffffffffa0420000>] ? 0xffffffffa0420000
[<ffffffffa0421ad5>] amd64_edac_init+0x1ad5/0x3570 [amd64_edac_mod]
[<ffffffff805f3da4>] ? set_track+0x94/0x240
[<ffffffff80200310>] ? try_to_run_init_process+0x40/0x40
[<ffffffff805f693c>] ? init_object+0x5c/0x110
[<ffffffff805fa4dd>] ? alloc_debug_processing+0x16d/0x340
[<ffffffffa0420000>] ? 0xffffffffa0420000
[<ffffffff805fabde>] ? ___slab_alloc+0x52e/0xa60
[<ffffffff8042e3f7>] ? trace_hardirqs_on_caller+0x467/0x6b0
[<ffffffffa0420000>] ? 0xffffffffa0420000
[<ffffffff802004e8>] do_one_initcall+0x98/0x250
[<ffffffff80200450>] ? initcall_blacklisted+0x140/0x140
[<ffffffff80600c6e>] ? kasan_kmalloc+0x5e/0x70
[<ffffffff80600bf5>] ? kasan_unpoison_shadow+0x35/0x50
[<ffffffff80600cfc>] ? __asan_register_globals+0x7c/0xa0
[<ffffffff8052f44b>] do_init_module+0x283/0x608
[<ffffffff8052f1c8>] ? rcu_dump_cpu_stacks+0x27d/0x27d
[<ffffffff805e1e1b>] ? __vunmap+0x18b/0x290
[<ffffffff804cd013>] load_module+0x4833/0x7e50
[<ffffffff804c2150>] ? find_sec+0x2a0/0x2a0
[<ffffffff804c87e0>] ? module_frob_arch_sections+0x20/0x20
[<ffffffff804d07ef>] SyS_init_module+0x1bf/0x1d0
[<ffffffff804d0630>] ? load_module+0x7e50/0x7e50
[<ffffffff802032fa>] ? trace_hardirqs_on_thunk+0x1a/0x1c
[<ffffffff814446a5>] entry_SYSCALL_64_fastpath+0x18/0xa8
Memory state around the buggy address:
ffff8802ccb00b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8802ccb00c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8802ccb00c80: fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00
^
ffff8802ccb00d00: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc
ffff8802ccb00d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
==================================================================
BUG: KASAN: slab-out-of-bounds in edac_pci_create_generic_ctl+0x2cd/0x370 at addr ffff8802ccb00bd8
Read of size 8 by task modprobe/1482
=============================================================================
BUG kmalloc-128 (Tainted: G B ): kasan: bad access detected
-----------------------------------------------------------------------------

INFO: Allocated in 0xffff8802ccb00cb8 age=18446744073709530075 cpu=2168654862 pid=-1
ghes_probe+0x220/0xbf0
___slab_alloc+0x665/0xa60
__slab_alloc+0x3e/0x70
kmem_cache_alloc+0x141/0x1f0
ghes_probe+0x220/0xbf0
platform_drv_probe+0x7c/0x190
driver_probe_device+0x1f8/0x780
__driver_attach+0x15a/0x1d0
bus_for_each_dev+0x121/0x1e0
driver_attach+0x3d/0x70
bus_add_driver+0x2d7/0x690
driver_register+0x1a4/0x3c0
__platform_driver_register+0xd2/0x120
ghes_init+0x190/0x2f1
do_one_initcall+0x98/0x250
kernel_init_freeable+0x3ff/0x499
INFO: Freed in 0xffff8cb7 age=18446740465937001440 cpu=0 pid=0
umh_complete+0x51/0x70
__slab_free+0x327/0x580
kfree+0x1a0/0x2b0
umh_complete+0x51/0x70
call_usermodehelper_exec_async+0x3d4/0x4f0
ret_from_fork+0x1f/0x40
INFO: Slab 0xffffea000b32c000 objects=35 used=35 fp=0x (null) flags=0x4000000000004080
INFO: Object 0xffff8802ccb00ae0 @offset=2784 fp=0xcccccccccccccccc

Redzone ffff8802ccb00ad8: 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZ
Object ffff8802ccb00ae0: cc cc cc cc cc cc cc cc d8 ea 89 01 00 c9 ff ff ................
Object ffff8802ccb00af0: f8 9e 74 cb 02 88 ff ff 00 00 00 00 00 00 00 00 ..t.............
Object ffff8802ccb00b00: 00 00 00 00 00 00 00 00 00 c7 51 82 ff ff ff ff ..........Q.....
Object ffff8802ccb00b10: 00 c7 51 82 ff ff ff ff 00 00 00 00 00 00 00 00 ..Q.............
Object ffff8802ccb00b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Object ffff8802ccb00b30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Object ffff8802ccb00b40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Object ffff8802ccb00b50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Redzone ffff8802ccb00b60: 00 00 00 00 00 00 00 00 ........
Padding ffff8802ccb00ca0: b6 8c ff ff 00 00 00 00 ........
CPU: 8 PID: 1482 Comm: modprobe Tainted: G B 4.7.0-rc3-00009-gdb06d75 #1
Hardware name: Supermicro X8DTH-i/6/iF/6F/X8DTH, BIOS 2.1b 05/04/12
0000000000000000 ffff8802c64b7758 ffffffff809e6b11 0000000041b58ab3
ffffffff818fbccf ffffffff809e6a5e ffffffff8190f3bb ffff8802ccb00ae0
00000000000001c8 ffff8802d10074c0 ffff8802c64b7758 ffffffff805f32a3
Call Trace:
[<ffffffff809e6b11>] dump_stack+0xb3/0x112
[<ffffffff809e6a5e>] ? _atomic_dec_and_lock+0xce/0xce
[<ffffffff805f32a3>] ? print_section+0x53/0xa0
[<ffffffff805f616e>] print_trailer+0x16e/0x2d0
[<ffffffff805fa35f>] object_err+0x2f/0x40
[<ffffffff80601699>] kasan_report_error+0x2e9/0x8b0
[<ffffffff810829ed>] ? edac_pci_create_generic_ctl+0x2cd/0x370
[<ffffffff80601e04>] __asan_report_load8_noabort+0x54/0x70
[<ffffffff810829ed>] ? edac_pci_create_generic_ctl+0x2cd/0x370
[<ffffffff810829ed>] edac_pci_create_generic_ctl+0x2cd/0x370
[<ffffffffa0420000>] ? 0xffffffffa0420000
[<ffffffffa0421ad5>] amd64_edac_init+0x1ad5/0x3570 [amd64_edac_mod]
[<ffffffff805f3da4>] ? set_track+0x94/0x240
[<ffffffff80200310>] ? try_to_run_init_process+0x40/0x40
[<ffffffff805f693c>] ? init_object+0x5c/0x110
[<ffffffff805fa4dd>] ? alloc_debug_processing+0x16d/0x340
[<ffffffffa0420000>] ? 0xffffffffa0420000
[<ffffffff805fabde>] ? ___slab_alloc+0x52e/0xa60
[<ffffffff8042e3f7>] ? trace_hardirqs_on_caller+0x467/0x6b0
[<ffffffffa0420000>] ? 0xffffffffa0420000
[<ffffffff802004e8>] do_one_initcall+0x98/0x250
[<ffffffff80200450>] ? initcall_blacklisted+0x140/0x140
[<ffffffff80600c6e>] ? kasan_kmalloc+0x5e/0x70
[<ffffffff80600bf5>] ? kasan_unpoison_shadow+0x35/0x50
[<ffffffff80600cfc>] ? __asan_register_globals+0x7c/0xa0
[<ffffffff8052f44b>] do_init_module+0x283/0x608
[<ffffffff8052f1c8>] ? rcu_dump_cpu_stacks+0x27d/0x27d
[<ffffffff805e1e1b>] ? __vunmap+0x18b/0x290
[<ffffffff804cd013>] load_module+0x4833/0x7e50
[<ffffffff804c2150>] ? find_sec+0x2a0/0x2a0
[<ffffffff804c87e0>] ? module_frob_arch_sections+0x20/0x20
[<ffffffff804d07ef>] SyS_init_module+0x1bf/0x1d0
[<ffffffff804d0630>] ? load_module+0x7e50/0x7e50
[<ffffffff802032fa>] ? trace_hardirqs_on_thunk+0x1a/0x1c
[<ffffffff814446a5>] entry_SYSCALL_64_fastpath+0x18/0xa8
Memory state around the buggy address:
ffff8802ccb00a80: fc fc fc fc fc fc fc fc fc fc fc fc fc 00 00 00
ffff8802ccb00b00: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc
>ffff8802ccb00b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff8802ccb00c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8802ccb00c80: fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00
==================================================================
==================================================================
BUG: KASAN: slab-out-of-bounds in sysfs_do_create_link_sd+0xf5/0x110 at addr ffff8802ccb00bc8
Read of size 8 by task modprobe/1482
=============================================================================
BUG kmalloc-128 (Tainted: G B ): kasan: bad access detected
-----------------------------------------------------------------------------

INFO: Allocated in 0xffff8802ccb00cb8 age=18446744073709530076 cpu=2168654862 pid=-1
ghes_probe+0x220/0xbf0
___slab_alloc+0x665/0xa60
__slab_alloc+0x3e/0x70
kmem_cache_alloc+0x141/0x1f0
ghes_probe+0x220/0xbf0
platform_drv_probe+0x7c/0x190
driver_probe_device+0x1f8/0x780
__driver_attach+0x15a/0x1d0
bus_for_each_dev+0x121/0x1e0
driver_attach+0x3d/0x70
bus_add_driver+0x2d7/0x690
driver_register+0x1a4/0x3c0
__platform_driver_register+0xd2/0x120
ghes_init+0x190/0x2f1
do_one_initcall+0x98/0x250
kernel_init_freeable+0x3ff/0x499
INFO: Freed in 0xffff8cb7 age=18446740465937001440 cpu=0 pid=0
umh_complete+0x51/0x70
__slab_free+0x327/0x580
kfree+0x1a0/0x2b0
umh_complete+0x51/0x70
call_usermodehelper_exec_async+0x3d4/0x4f0
ret_from_fork+0x1f/0x40
INFO: Slab 0xffffea000b32c000 objects=35 used=35 fp=0x (null) flags=0x4000000000004080
INFO: Object 0xffff8802ccb00ae0 @offset=2784 fp=0xcccccccccccccccc

Redzone ffff8802ccb00ad8: 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZ
Object ffff8802ccb00ae0: cc cc cc cc cc cc cc cc d8 ea 89 01 00 c9 ff ff ................
Object ffff8802ccb00af0: f8 9e 74 cb 02 88 ff ff 00 00 00 00 00 00 00 00 ..t.............
Object ffff8802ccb00b00: 00 00 00 00 00 00 00 00 00 c7 51 82 ff ff ff ff ..........Q.....
Object ffff8802ccb00b10: 00 c7 51 82 ff ff ff ff 00 00 00 00 00 00 00 00 ..Q.............
Object ffff8802ccb00b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Object ffff8802ccb00b30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Object ffff8802ccb00b40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Object ffff8802ccb00b50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Redzone ffff8802ccb00b60: 00 00 00 00 00 00 00 00 ........
Padding ffff8802ccb00ca0: b6 8c ff ff 00 00 00 00 ........
CPU: 8 PID: 1482 Comm: modprobe Tainted: G B 4.7.0-rc3-00009-gdb06d75 #1
Hardware name: Supermicro X8DTH-i/6/iF/6F/X8DTH, BIOS 2.1b 05/04/12
0000000000000000 ffff8802c64b7610 ffffffff809e6b11 0000000041b58ab3
ffffffff818fbccf ffffffff809e6a5e ffffffff8190f3bb ffff8802ccb00ae0
00000000000001c8 ffff8802d10074c0 ffff8802c64b7610 ffffffff805f32a3
Call Trace:
[<ffffffff809e6b11>] dump_stack+0xb3/0x112
[<ffffffff809e6a5e>] ? _atomic_dec_and_lock+0xce/0xce
[<ffffffff805f32a3>] ? print_section+0x53/0xa0
[<ffffffff805f616e>] print_trailer+0x16e/0x2d0
[<ffffffff805fa35f>] object_err+0x2f/0x40
[<ffffffff80601699>] kasan_report_error+0x2e9/0x8b0
[<ffffffff809f1282>] ? kobject_add_internal+0x392/0x8d0
[<ffffffff80a1ff87>] ? kvasprintf_const+0x47/0x120
[<ffffffff80789c75>] ? sysfs_do_create_link_sd+0xf5/0x110
[<ffffffff80601e04>] __asan_report_load8_noabort+0x54/0x70
[<ffffffff80789c75>] ? sysfs_do_create_link_sd+0xf5/0x110
[<ffffffff80789c75>] sysfs_do_create_link_sd+0xf5/0x110
[<ffffffff80789ccf>] sysfs_create_link+0x3f/0xb0
[<ffffffff8108402d>] edac_pci_create_sysfs+0xed/0x2a0
[<ffffffff81081dfa>] edac_pci_add_device+0x24a/0xb70
[<ffffffff81081bb0>] ? edac_pci_alloc_ctl_info+0x170/0x170
[<ffffffff810829ed>] ? edac_pci_create_generic_ctl+0x2cd/0x370
[<ffffffff80601e04>] ? __asan_report_load8_noabort+0x54/0x70
[<ffffffff81082924>] edac_pci_create_generic_ctl+0x204/0x370
[<ffffffffa0420000>] ? 0xffffffffa0420000
[<ffffffffa0421ad5>] amd64_edac_init+0x1ad5/0x3570 [amd64_edac_mod]
[<ffffffff805f3da4>] ? set_track+0x94/0x240
[<ffffffff80200310>] ? try_to_run_init_process+0x40/0x40
[<ffffffff805f693c>] ? init_object+0x5c/0x110
[<ffffffff805fa4dd>] ? alloc_debug_processing+0x16d/0x340
[<ffffffffa0420000>] ? 0xffffffffa0420000
[<ffffffff805fabde>] ? ___slab_alloc+0x52e/0xa60
[<ffffffff8042e3f7>] ? trace_hardirqs_on_caller+0x467/0x6b0
[<ffffffffa0420000>] ? 0xffffffffa0420000
[<ffffffff802004e8>] do_one_initcall+0x98/0x250
[<ffffffff80200450>] ? initcall_blacklisted+0x140/0x140
[<ffffffff80600c6e>] ? kasan_kmalloc+0x5e/0x70
[<ffffffff80600bf5>] ? kasan_unpoison_shadow+0x35/0x50
[<ffffffff80600cfc>] ? __asan_register_globals+0x7c/0xa0
[<ffffffff8052f44b>] do_init_module+0x283/0x608
[<ffffffff8052f1c8>] ? rcu_dump_cpu_stacks+0x27d/0x27d
[<ffffffff805e1e1b>] ? __vunmap+0x18b/0x290
[<ffffffff804cd013>] load_module+0x4833/0x7e50
[<ffffffff804c2150>] ? find_sec+0x2a0/0x2a0
[<ffffffff804c87e0>] ? module_frob_arch_sections+0x20/0x20
[<ffffffff804d07ef>] SyS_init_module+0x1bf/0x1d0
[<ffffffff804d0630>] ? load_module+0x7e50/0x7e50
[<ffffffff802032fa>] ? trace_hardirqs_on_thunk+0x1a/0x1c
[<ffffffff814446a5>] entry_SYSCALL_64_fastpath+0x18/0xa8
Memory state around the buggy address:
ffff8802ccb00a80: fc fc fc fc fc fc fc fc fc fc fc fc fc 00 00 00
ffff8802ccb00b00: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc
>ffff8802ccb00b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff8802ccb00c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8802ccb00c80: fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00
==================================================================
BUG: unable to handle kernel paging request at ffffffff80d405b7
IP: [<ffffffff8077af09>] kernfs_get+0x39/0x60
PGD 1a0b067 PUD 1a0c063 PMD c001e1
Oops: 0003 [#1] SMP DEBUG_PAGEALLOC KASAN
Modules linked in: amd64_edac_mod(+) iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi mpt3sas scsi_transport_sas raid_class igb i2c_algo_bit ptp pps_core sg coretemp eeprom w83795 i2c_i801
CPU: 8 PID: 1482 Comm: modprobe Tainted: G B 4.7.0-rc3-00009-gdb06d75 #1
Hardware name: Supermicro X8DTH-i/6/iF/6F/X8DTH, BIOS 2.1b 05/04/12
task: ffff8802cc5a3dc0 ti: ffff8802c64b0000 task.ti: ffff8802c64b0000
RIP: 0010:[<ffffffff8077af09>] [<ffffffff8077af09>] kernfs_get+0x39/0x60
RSP: 0018:ffff8802c64b7748 EFLAGS: 00010282
RAX: 00000000840fc085 RBX: ffffffff80d405b7 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffffffff80d405b7
RBP: ffff8802c64b7750 R08: 0000000000000001 R09: 0000000000000000
R10: ffff8802c64b76b4 R11: 0000000000000000 R12: ffffffff817d76c0
R13: ffff8802c64c3938 R14: 0000000000000001 R15: dffffc0000000000
FS: 00007fada24b8700(0000) GS:ffff8802d1600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffff80d405b7 CR3: 00000002cb545000 CR4: 00000000000006e0
Stack:
ffffffff80d405b7 ffff8802c64b7788 ffffffff80789bf0 ffff8802c6bdbbf0
0000000000000000 ffff8802c6bdbbf0 ffff8802d1007740 dffffc0000000000
ffff8802c64b77b0 ffffffff80789ccf dffffc0000000000 ffff8802c64b77b0
Call Trace:
[<ffffffff80d405b7>] ? bus_add_driver+0x2d7/0x690
[<ffffffff80789bf0>] sysfs_do_create_link_sd+0x70/0x110
[<ffffffff80789ccf>] sysfs_create_link+0x3f/0xb0
[<ffffffff8108402d>] edac_pci_create_sysfs+0xed/0x2a0
[<ffffffff81081dfa>] edac_pci_add_device+0x24a/0xb70
[<ffffffff81081bb0>] ? edac_pci_alloc_ctl_info+0x170/0x170
[<ffffffff810829ed>] ? edac_pci_create_generic_ctl+0x2cd/0x370
[<ffffffff80601e04>] ? __asan_report_load8_noabort+0x54/0x70
[<ffffffff81082924>] edac_pci_create_generic_ctl+0x204/0x370
[<ffffffffa0420000>] ? 0xffffffffa0420000
[<ffffffffa0421ad5>] amd64_edac_init+0x1ad5/0x3570 [amd64_edac_mod]
[<ffffffff805f3da4>] ? set_track+0x94/0x240
[<ffffffff80200310>] ? try_to_run_init_process+0x40/0x40
[<ffffffff805f693c>] ? init_object+0x5c/0x110
[<ffffffff805fa4dd>] ? alloc_debug_processing+0x16d/0x340
[<ffffffffa0420000>] ? 0xffffffffa0420000
[<ffffffff805fabde>] ? ___slab_alloc+0x52e/0xa60
[<ffffffff8042e3f7>] ? trace_hardirqs_on_caller+0x467/0x6b0
[<ffffffffa0420000>] ? 0xffffffffa0420000
[<ffffffff802004e8>] do_one_initcall+0x98/0x250
[<ffffffff80200450>] ? initcall_blacklisted+0x140/0x140
[<ffffffff80600c6e>] ? kasan_kmalloc+0x5e/0x70
[<ffffffff80600bf5>] ? kasan_unpoison_shadow+0x35/0x50
[<ffffffff80600cfc>] ? __asan_register_globals+0x7c/0xa0
[<ffffffff8052f44b>] do_init_module+0x283/0x608
[<ffffffff8052f1c8>] ? rcu_dump_cpu_stacks+0x27d/0x27d
[<ffffffff805e1e1b>] ? __vunmap+0x18b/0x290
[<ffffffff804cd013>] load_module+0x4833/0x7e50
[<ffffffff804c2150>] ? find_sec+0x2a0/0x2a0
[<ffffffff804c87e0>] ? module_frob_arch_sections+0x20/0x20
[<ffffffff804d07ef>] SyS_init_module+0x1bf/0x1d0
[<ffffffff804d0630>] ? load_module+0x7e50/0x7e50
[<ffffffff802032fa>] ? trace_hardirqs_on_thunk+0x1a/0x1c
[<ffffffff814446a5>] entry_SYSCALL_64_fastpath+0x18/0xa8
Code: df 48 89 fa 55 48 c1 ea 03 48 89 e5 53 48 89 fb 0f b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 1f 8b 03 85 c0 74 06 <f0> ff 03 5b 5d c3 be 15 02 00 00 48 c7 c7 80 b6 69 81 e8 10 c5
RIP [<ffffffff8077af09>] kernfs_get+0x39/0x60
RSP <ffff8802c64b7748>
CR2: ffffffff80d405b7
---[ end trace 7cc4db6fc087364a ]---
BUG: sleeping function called from invalid context at include/linux/sched.h:2955
in_atomic(): 1, irqs_disabled(): 1, pid: 1482, name: modprobe
INFO: lockdep is turned off.
irq event stamp: 7702
hardirqs last enabled at (7701): [<ffffffff805fb15b>] __slab_alloc+0x4b/0x70
hardirqs last disabled at (7702): [<ffffffff81443e17>] _raw_spin_lock_irqsave+0x17/0x60
softirqs last enabled at (1242): [<ffffffff81446a07>] __do_softirq+0x457/0x933
softirqs last disabled at (1235): [<ffffffff80345974>] irq_exit+0xf4/0x1e0
CPU: 8 PID: 1482 Comm: modprobe Tainted: G B D 4.7.0-rc3-00009-gdb06d75 #1
Hardware name: Supermicro X8DTH-i/6/iF/6F/X8DTH, BIOS 2.1b 05/04/12
0000000000000000 ffff8802c64b7248 ffffffff809e6b11 0000000041b58ab3
ffffffff818fbccf ffffffff809e6a5e ffff8802d1028375 ffff88020000000a
ffffffff80345974 ffffffff80345974 0000000000000000 0000000000000001
Call Trace:
[<ffffffff809e6b11>] dump_stack+0xb3/0x112
[<ffffffff809e6a5e>] ? _atomic_dec_and_lock+0xce/0xce
[<ffffffff80345974>] ? irq_exit+0xf4/0x1e0
[<ffffffff80345974>] ? irq_exit+0xf4/0x1e0
[<ffffffff803ae0b1>] ___might_sleep+0x281/0x470
[<ffffffff803ae2fb>] __might_sleep+0x5b/0x260
[<ffffffff80367b15>] exit_signals+0x75/0x480
[<ffffffff80367aa0>] ? get_signal+0x1930/0x1930
[<ffffffff80448273>] ? console_unlock+0x793/0xa80
[<ffffffff8044873d>] ? vprintk_emit+0x1dd/0x740
[<ffffffff8042ec60>] ? debug_check_no_locks_freed+0x330/0x330
[<ffffffff8033e754>] do_exit+0x224/0x1200
[<ffffffff8043dbc0>] ? do_raw_spin_trylock+0x100/0x100
[<ffffffff8033e530>] ? exit_notify+0x6f0/0x6f0
[<ffffffff8044a342>] ? kmsg_dump+0x32/0x3d0
[<ffffffff8044a536>] ? kmsg_dump+0x226/0x3d0
[<ffffffff8044a555>] ? kmsg_dump+0x245/0x3d0
[<ffffffff8044a342>] ? kmsg_dump+0x32/0x3d0
[<ffffffff8026ea55>] oops_end+0x65/0xa0
[<ffffffff802ebe3a>] no_context+0x39a/0x8e0
[<ffffffff80d405b7>] ? bus_add_driver+0x2d7/0x690
[<ffffffff802ebaa0>] ? is_prefetch.isra.1+0x300/0x300
[<ffffffff802032fa>] ? trace_hardirqs_on_thunk+0x1a/0x1c
[<ffffffff80d405b7>] ? bus_add_driver+0x2d7/0x690
[<ffffffff802ec3e0>] __bad_area_nosemaphore+0x60/0x370
[<ffffffff8144504c>] ? retint_kernel+0x10/0x10
[<ffffffff80d405b7>] ? bus_add_driver+0x2d7/0x690
[<ffffffff802ec6ff>] bad_area_nosemaphore+0xf/0x20
[<ffffffff802ed258>] __do_page_fault+0x338/0x960
[<ffffffff80203316>] ? trace_hardirqs_off_thunk+0x1a/0x1c
[<ffffffff802ed8bc>] do_page_fault+0xc/0x10
[<ffffffff81445c9f>] page_fault+0x1f/0x30
[<ffffffff80d405b7>] ? bus_add_driver+0x2d7/0x690
[<ffffffff80d405b7>] ? bus_add_driver+0x2d7/0x690
[<ffffffff8077af09>] ? kernfs_get+0x39/0x60
[<ffffffff80d405b7>] ? bus_add_driver+0x2d7/0x690
[<ffffffff80789bf0>] sysfs_do_create_link_sd+0x70/0x110
[<ffffffff80789ccf>] sysfs_create_link+0x3f/0xb0
[<ffffffff8108402d>] edac_pci_create_sysfs+0xed/0x2a0
[<ffffffff81081dfa>] edac_pci_add_device+0x24a/0xb70
[<ffffffff81081bb0>] ? edac_pci_alloc_ctl_info+0x170/0x170
[<ffffffff810829ed>] ? edac_pci_create_generic_ctl+0x2cd/0x370
[<ffffffff80601e04>] ? __asan_report_load8_noabort+0x54/0x70
[<ffffffff81082924>] edac_pci_create_generic_ctl+0x204/0x370
[<ffffffffa0420000>] ? 0xffffffffa0420000
[<ffffffffa0421ad5>] amd64_edac_init+0x1ad5/0x3570 [amd64_edac_mod]
[<ffffffff805f3da4>] ? set_track+0x94/0x240
[<ffffffff80200310>] ? try_to_run_init_process+0x40/0x40
[<ffffffff805f693c>] ? init_object+0x5c/0x110
[<ffffffff805fa4dd>] ? alloc_debug_processing+0x16d/0x340
[<ffffffffa0420000>] ? 0xffffffffa0420000
[<ffffffff805fabde>] ? ___slab_alloc+0x52e/0xa60
[<ffffffff8042e3f7>] ? trace_hardirqs_on_caller+0x467/0x6b0
[<ffffffffa0420000>] ? 0xffffffffa0420000
[<ffffffff802004e8>] do_one_initcall+0x98/0x250
[<ffffffff80200450>] ? initcall_blacklisted+0x140/0x140
[<ffffffff80600c6e>] ? kasan_kmalloc+0x5e/0x70
[<ffffffff80600bf5>] ? kasan_unpoison_shadow+0x35/0x50
[<ffffffff80600cfc>] ? __asan_register_globals+0x7c/0xa0
[<ffffffff8052f44b>] do_init_module+0x283/0x608
[<ffffffff8052f1c8>] ? rcu_dump_cpu_stacks+0x27d/0x27d
[<ffffffff805e1e1b>] ? __vunmap+0x18b/0x290
[<ffffffff804cd013>] load_module+0x4833/0x7e50
[<ffffffff804c2150>] ? find_sec+0x2a0/0x2a0
[<ffffffff804c87e0>] ? module_frob_arch_sections+0x20/0x20
[<ffffffff804d07ef>] SyS_init_module+0x1bf/0x1d0
[<ffffffff804d0630>] ? load_module+0x7e50/0x7e50
[<ffffffff802032fa>] ? trace_hardirqs_on_thunk+0x1a/0x1c
[<ffffffff814446a5>] entry_SYSCALL_64_fastpath+0x18/0xa8
note: modprobe[1482] exited with preempt_count 1