Kernel warning and/or panic while reloading i7core_edac and edac_core modules
Issue
- While trying to reload i7core_edac plus edac_core modules (for example, to load edac_core with different options), a WARNING or kernel panic can happen. For example, after doing these steps:
# lsmod | grep edac
i7core_edac 18024 0
edac_core 46581 4 i7core_edac
# rmmod i7core_edac
# lsmod | grep edac
edac_core 46581 0
# rmmod edac_core
# lsmod | grep edac
# /sbin/modprobe edac_core edac_mc_poll_msec=1000 edac_mc_panic_on_ue=1 edac_mc_log_ue=1 edac_mc_log_ce=1 check_pci_errors=0 edac_pci_panic_on_pe=0
- System crashes, for example with following warning/panic displayed on kernel log:
EDAC PCI: Removed device 0 for i7core_edac EDAC PCI controller: DEV 0000:ff:03.0
EDAC MC: Removed device 0 for i7core_edac.c i7 core #0: DEV 0000:ff:03.0
EDAC PCI: Removed device 1 for i7core_edac EDAC PCI controller: DEV 0000:fe:03.0
EDAC MC: Removed device 1 for i7core_edac.c i7 core #1: DEV 0000:fe:03.0
EDAC MC: Ver: 2.1.0 Dec 16 2014
------------[ cut here ]------------
WARNING: at lib/kref.c:43 kref_get+0x2d/0x30() (Tainted: P --------------- )
(...)
Modules linked in: edac_core(+) drbd(U) libcrc32c mptctl deflate zlib_deflate ctr camellia cast5 rmd160 crypto_null ccm serpent blowfish twofish_x86_64 twofish_common ecb xcbc
cbc sha256_generic sha512_generic des_generic aesni_intel cryptd aes_x86_64 aes_generic ah6 ah4 esp6 esp4 xfrm4_mode_beet xfrm4_tunnel tunnel4 xfrm4_mode_tunnel xfrm4_mode_tr
ansport xfrm6_mode_transport xfrm6_mode_ro xfrm6_mode_beet xfrm6_mode_tunnel ipcomp ipcomp6 xfrm_ipcomp xfrm6_tunnel tunnel6 af_key nfsd lockd nfs_acl auth_rpcgss sunrpc expor
tfs msa(U) ipv6 fwks(P)(U) ipmi_watchdog ipmi_poweroff ipmi_devintf i2c_dev microcode i2c_i801 i2c_core iTCO_wdt iTCO_vendor_support ioatdma igb ixgbe dca ptp pps_core mdio sg
ext3 jbd mbcache sd_mod crc_t10dif usb_storage mptsas mptscsih mptbase scsi_transport_sas dm_mirror dm_region_hash dm_log dm_mod [last unloaded: edac_core]
Pid: 2238, comm: modprobe Tainted: P --------------- 2.6.32-358.55.1.el6.x86_64 #1
Call Trace:
[<ffffffff8106e487>] ? warn_slowpath_common+0x87/0xc0
[<ffffffff8106e4da>] ? warn_slowpath_null+0x1a/0x20
[<ffffffff8127adbd>] ? kref_get+0x2d/0x30
[<ffffffff81279a3a>] ? kobject_get+0x1a/0x30
[<ffffffff81279b9c>] ? kobject_add_internal+0x4c/0x260
[<ffffffff81279ddf>] ? kset_register+0x2f/0x60
[<ffffffff8127a0f4>] ? kset_create_and_add+0x74/0xa0
[<ffffffffa00b0000>] ? edac_init+0x0/0x6a [edac_core]
[<ffffffffa0284e1a>] ? edac_sysfs_setup_mc_kset+0x2a/0x50 [edac_core]
[<ffffffffa00b0021>] ? edac_init+0x21/0x6a [edac_core]
[<ffffffff8100204c>] ? do_one_initcall+0x3c/0x1d0
[<ffffffff810b7681>] ? sys_init_module+0xe1/0x250
[<ffffffff8100b072>] ? system_call_fastpath+0x16/0x1b
---[ end trace 0edee3f4545b6c94 ]---
BUG: unable to handle kernel NULL pointer dereference at 0000000000000078
IP: [<ffffffff811faadd>] sysfs_addrm_start+0x3d/0xd0
PGD 415d3f067 PUD 42812d067 PMD 0
Oops: 0000 [#1] SMP
last sysfs file: /sys/module/libcrc32c/refcnt
CPU 1
Modules linked in: edac_core(+) drbd(U) libcrc32c mptctl deflate zlib_deflate ctr camellia cast5 rmd160 crypto_null ccm serpent blowfish twofish_x86_64 twofish_common ecb xcbc cbc sha256_generic sha512_generic des_generic aesni_intel cryptd aes_x86_64 aes_generic ah6 ah4 esp6 esp4 xfrm4_mode_beet xfrm4_tunnel tunnel4 xfrm4_mode_tunnel xfrm4_mode_transport xfrm6_mode_transport xfrm6_mode_ro xfrm6_mode_beet xfrm6_mode_tunnel ipcomp ipcomp6 xfrm_ipcomp xfrm6_tunnel tunnel6 af_key nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs msa(U) ipv6 fwks(P)(U) ipmi_watchdog ipmi_poweroff ipmi_devintf i2c_dev microcode i2c_i801 i2c_core iTCO_wdt iTCO_vendor_support ioatdma igb ixgbe dca ptp pps_core mdio sg ext3 jbd mbcache sd_mod crc_t10dif usb_storage mptsas mptscsih mptbase scsi_transport_sas dm_mirror dm_region_hash dm_log dm_mod [last unloaded: edac_core]
Pid: 2238, comm: modprobe Tainted: P W --------------- 2.6.32-358.55.1.el6.x86_64 #1 (...)
RIP: 0010:[<ffffffff811faadd>] [<ffffffff811faadd>] sysfs_addrm_start+0x3d/0xd0
RSP: 0018:ffff8804280b7da8 EFLAGS: 00010286
RAX: ffff8804280b6000 RBX: ffff8804280b7dd8 RCX: ffff8804280b7d94
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff81adc0c0
RBP: ffff8804280b7dc8 R08: ffff8808378ee0e0 R09: 00000000000000c0
R10: 000000000000000e R11: 000000000000000e R12: 0000000000000000
R13: ffff8804280b7e40 R14: ffff880415f65e20 R15: 00000000fffffff4
FS: 00007fab6a6c9700(0000) GS:ffff880028220000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000078 CR3: 00000004160db000 CR4: 00000000000007e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process modprobe (pid: 2238, threadinfo ffff8804280b6000, task ffff880438faf500)
Stack:
ffff8804378e8f58 ffff8804280b7e40 0000000000000000 ffff8804280b7dd8
<d> ffff8804280b7e28 ffffffff811fbdfd 0000000000000000 0000000000000000
<d> 0000000000000000 0000000000000000 ffff8804378e8f40 ffff8804378e8f58
Call Trace:
[<ffffffff811fbdfd>] create_dir+0x5d/0xb0
[<ffffffff811fbe89>] sysfs_create_dir+0x39/0x50
[<ffffffff81279a3a>] ? kobject_get+0x1a/0x30
[<ffffffff81279c09>] kobject_add_internal+0xb9/0x260
[<ffffffff81279ddf>] kset_register+0x2f/0x60
[<ffffffff8127a0f4>] kset_create_and_add+0x74/0xa0
[<ffffffffa00b0000>] ? edac_init+0x0/0x6a [edac_core]
[<ffffffffa0284e1a>] edac_sysfs_setup_mc_kset+0x2a/0x50 [edac_core]
[<ffffffffa00b0021>] edac_init+0x21/0x6a [edac_core]
[<ffffffff8100204c>] do_one_initcall+0x3c/0x1d0
[<ffffffff810b7681>] sys_init_module+0xe1/0x250
[<ffffffff8100b072>] system_call_fastpath+0x16/0x1b
Code: fb 49 89 f4 48 c7 47 08 00 00 00 00 48 c7 47 10 00 00 00 00 48 c7 47 18 00 00 00 00 48 c7 c7 c0 c0 ad 81 48 89 33 e8 c3 5b 31 00 <49> 8b 74 24 78 48 8b 3d 5f 1e dd 00 4c 89 e1 48 c7 c2 d0 a7 1f
RIP [<ffffffff811faadd>] sysfs_addrm_start+0x3d/0xd0
RSP <ffff8804280b7da8>
CR2: 0000000000000078
Environment
- Red Hat Enterprise Linux 6
- EDAC pci device with more than one memory controller
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.