That shouldn't happen. Did you deregister the user when you removed the
module?
Actually, that doesn't seem to be it:
[<ffffffff8169b32e>] ? do_page_fault+0x3e/0xa0
[<ffffffff816986b5>] ? page_fault+0x25/0x30
[<ffffffff81356abc>] ? misc_register+0x4c/0x170
[<ffffffff81356a97>] ? misc_register+0x27/0x170
[<ffffffffa00b4354>] ? sce_new_smi+0x74/0x10c [ipmi_sce_logger]
[<ffffffffa006f4a1>] ? ipmi_smi_watcher_register+0x121/0x240
[ipmi_msghandler]
[<ffffffff8169b3e5>] ? notifier_call_chain+0x55/0x80
[<ffffffffa00b8000>] ? ipmi_sce_init+0x0/0x3f [ipmi_sce_logger]
Notice it calls your sce_new_smi code, which calls misc_register, which
fails. I suspect you didn't remove the misc device registration when
you removed the module.
-corey
On 11/11/2013 06:04 PM, David Bashaw wrote:
> Hello all.
>
> I have been developing a kernel module to log OEM SEL entries.
> I noticed the following problem:
>
> # insmod ipmi_sce_logger.ko
> IPMI sce error logger: sce user created
> IPMI sce error logger: driver initialized
>
> Now rmmod
>
> # rmmod ipmi_sce_logger
> IPMI sce error logger: ipmi_sce_exit
> #
>
> So far so good. Now insmod a second time.
>
> # insmod ipmi_sce_logger.ko
> BUG: unable to handle kernel paging request at 0000001e13e80000
> IP: [<ffffffff81356abc>] misc_register+0x4c/0x170
> PGD 42f00a067 PUD 0
> Oops: 0000 [#1] SMP
> last sysfs file:
> /sys/devices/pci0000:00/0000:00:0c.0/0000:02:00.0/host0/port-0:0/expander-0:0/phy-0:0:20/sas_phy/phy-0:0:20/phy_identifier
> CPU 1
> Pid: 12131, comm: insmod Not tainted 2.6.32 #1 empty
> RIP: 0010:[<ffffffff81356abc>] [<ffffffff81356abc>]
> misc_register+0x4c/0x170
> RSP: 0018:ffff88042c7b3e78 EFLAGS: 00010283
> RAX: 0000001e13e7ffe8 RBX: ffffffffa00b4980 RCX: 0000001e13e80000
> RDX: 0000000000000095 RSI: ffffffffa00ad998 RDI: ffffffff81cf1ae0
> RBP: ffff88042c7b3e88 R08: 00000000000000d0 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000003 R12: ffffffffa00b4998
> R13: ffff88042c7b3eb8 R14: ffffffffa00b4940 R15: ffff880437c00040
> FS: 00007ffb34b37700(0000) GS:ffff880028240000(0000)
> knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 0000001e13e80000 CR3: 000000042e423000 CR4: 00000000000006e0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> Process insmod (pid: 12131, threadinfo ffff88042c7b2000, task
> ffff8804327baab0)
> Stack:
> ffff88042f8ba440 ffff88042c7b3ea8 ffff88042c7b3e98 ffffffffa00b4354
> <0> ffff88042c7b3ef8 ffffffffa006f4a1 ffff88042c7b3ee8 ffffffff8169b3e5
> <0> ffff88042c7b3eb8 ffff88042c7b3eb8 ffffffff81ca1bc0 0000000000000000
> Call Trace:
> [<ffffffffa00b4354>] sce_new_smi+0x74/0x10c [ipmi_sce_logger]
> [<ffffffffa006f4a1>] ipmi_smi_watcher_register+0x121/0x240
> [ipmi_msghandler]
> [<ffffffff8169b3e5>] ? notifier_call_chain+0x55/0x80
> [<ffffffffa00b8000>] ? ipmi_sce_init+0x0/0x3f [ipmi_sce_logger]
> [<ffffffffa00b8015>] ipmi_sce_init+0x15/0x3f [ipmi_sce_logger]
> [<ffffffff8100204c>] do_one_initcall+0x3c/0x1d0
> [<ffffffff810a44cf>] sys_init_module+0xdf/0x250
> [<ffffffff8100b132>] system_call_fastpath+0x16/0x1b
> Code: 81 e8 f9 02 34 00 48 8b 05 62 b0 99 00 8b 13 48 83 e8 18 eb 16
> 66 2e 0f 1f 84 00 00 00 00 00 39 10 0f 84 98 00 00 00 48 8d 41 e8 <48>
> 8b 48 18 48 8d 70 18 48 81 fe 00 1b cf 81 0f 18 09 75 e0 81
> RIP [<ffffffff81356abc>] misc_register+0x4c/0x170
> RSP <ffff88042c7b3e78>
> CR2: 0000001e13e80000
> ---[ end trace 9c1825899c25a062 ]---
> Kernel panic - not syncing: Fatal exception
> Pid: 12131, comm: insmod Tainted: G D ---------------- 2.6.32 #1
> Call Trace:
> [<ffffffff81695279>] ? panic+0x7d/0x148
> [<ffffffff81699344>] ? oops_end+0xe4/0x100
> [<ffffffff8103b48b>] ? no_context+0xfb/0x260
> [<ffffffff8103b715>] ? __bad_area_nosemaphore+0x125/0x1e0
> [<ffffffff811c35b0>] ? sysfs_ilookup_test+0x0/0x20
> [<ffffffff8103b83e>] ? bad_area+0x4e/0x60
> [<ffffffff8103bf63>] ? __do_page_fault+0x3c3/0x480
> [<ffffffff812d8f20>] ? idr_get_empty_slot+0x110/0x2c0
> [<ffffffff812d9180>] ? ida_get_new_above+0xb0/0x210
> [<ffffffff811c35b0>] ? sysfs_ilookup_test+0x0/0x20
> [<ffffffff8169b32e>] ? do_page_fault+0x3e/0xa0
> [<ffffffff816986b5>] ? page_fault+0x25/0x30
> [<ffffffff81356abc>] ? misc_register+0x4c/0x170
> [<ffffffff81356a97>] ? misc_register+0x27/0x170
> [<ffffffffa00b4354>] ? sce_new_smi+0x74/0x10c [ipmi_sce_logger]
> [<ffffffffa006f4a1>] ? ipmi_smi_watcher_register+0x121/0x240
> [ipmi_msghandler]
> [<ffffffff8169b3e5>] ? notifier_call_chain+0x55/0x80
> [<ffffffffa00b8000>] ? ipmi_sce_init+0x0/0x3f [ipmi_sce_logger]
> [<ffffffffa00b8015>] ? ipmi_sce_init+0x15/0x3f [ipmi_sce_logger]
> [<ffffffff8100204c>] ? do_one_initcall+0x3c/0x1d0
> [<ffffffff810a44cf>] ? sys_init_module+0xdf/0x250
> [<ffffffff8100b132>] ? system_call_fastpath+0x16/0x1b
>
> My smi de-register was not invoked so the next insmod caused mushroom
> cloud.
>
> Is this to be expected?
> Is there a way to fix this I don't know about?
>
> Dave
>
>
>
> ------------------------------------------------------------------------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models. Explore
> techniques for threading, error checking, porting, and tuning. Get the most
> from the latest Intel processors and coprocessors. See abstracts and register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
>
>
> _______________________________________________
> Openipmi-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openipmi-developer
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer