Bug 1716 - 'rmmod processor' oops
Summary: 'rmmod processor' oops
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Processor (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Shaohua
URL:
Keywords:
: 2350 2705 3013 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-12-21 06:40 UTC by Ondrej Palkovsky
Modified: 2004-10-17 20:27 UTC (History)
5 users (show)

See Also:
Kernel Version: 2.6.0
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
patch for the error (466 bytes, patch)
2003-12-25 01:43 UTC, Shaohua
Details | Diff
updated patch (1.81 KB, patch)
2004-01-04 17:23 UTC, Shaohua
Details | Diff
patch for prevent sleeping in atomic area (526 bytes, patch)
2004-01-13 17:10 UTC, Shaohua
Details | Diff
updated patch (7.57 KB, patch)
2004-02-23 19:22 UTC, Shaohua
Details | Diff
patch for 2.4 kernel (7.23 KB, patch)
2004-04-15 01:40 UTC, Shaohua
Details | Diff
use synchronize_kernel to quiesce after changing idle function (785 bytes, patch)
2004-07-20 08:43 UTC, Zwane Mwaikambo
Details | Diff

Description Ondrej Palkovsky 2003-12-21 06:40:29 UTC
Distribution: Debian unstable
Hardware Environment: IBM ThinkPad T41
Software Environment: Kernel compiled with gcc 3.3.3
Problem Description:
When unloading processor.o, Oops appears. When the module is loaded again, it
does not work any more (the processor does not change to C2/C3 when idle).

  printing eip:
d28a023e
Oops: 0000 [#1]
 CPU:    0
EIP:    0060:[mrt_lock+307390910/1070090112]    Not tainted
EFLAGS: 00010216
EIP is at 0xd28a023e
eax: 00ef8485   ebx: 00001008   ecx: 00ef7ead   edx: 00001008
esi: cfa64eb0   edi: c0105000   ebp: cfa64e00   esp: c0341fc0
ds: 007b   es: 007b   ss: 0068
Process swapper (pid: 0, threadinfo=c0340000 task=c02d88a0)
Stack: 0009f600 00000001 c0340000 0009f600 c0105000 0008e000 c010709f 00000816
        c0342690 c02d88a0 00000000 c035d6d0 00000000 c03423ea c0361ca0 c010017e
Call Trace:
  [<c0105000>] rest_init+0x0/0x5d
  [<c010709f>] cpu_idle+0x2c/0x35
  [_edata+16528/50395] start_kernel+0x182/0x1b0
  [_edata+15850/50395] unknown_bootoption+0x0/0xfd
 Code:  Bad EIP value.
  <0>Kernel panic: Attempted to kill the idle task!


Steps to reproduce:
mopdprobe processor
rmmod processor
Comment 1 Shaohua 2003-12-21 19:30:41 UTC
please try remove thermal.o before removing processor.o, can this help?
Comment 2 Ondrej Palkovsky 2003-12-22 01:20:16 UTC
No, it seems to be related to pre-emptive kernel. After recompiling the kernel
without pre-emption enabled, everything is OK.
Comment 3 Shaohua 2003-12-25 01:43:10 UTC
Created attachment 1746 [details]
patch for the error

please try this patch, in my system, with this patch the error is fixed. Thanks
Comment 4 Ondrej Palkovsky 2003-12-25 02:14:52 UTC
I have tried it and it did fix the problem. Thanks.
Comment 5 Shaohua 2004-01-04 17:23:03 UTC
Created attachment 1789 [details]
updated patch

previous patch can't handle SMP situation. please try the new one. Thanks.
Comment 6 Shaohua 2004-01-08 21:22:30 UTC
sorry, other parts of ACPI may cause the patch failed, I will provide a final 
patch later.
Comment 7 Shaohua 2004-01-13 17:10:54 UTC
Created attachment 1851 [details]
patch for prevent sleeping in atomic area

This patch is to fix sleep in atomic area issue. Your oops can be fixed by this
one and attachment 1789 [details] combined. Please try it. Thanks.
Comment 8 Ondrej Palkovsky 2004-01-22 13:32:00 UTC
Tried the patches with 2.6.1 and works ok.
Comment 9 Shaohua 2004-02-23 19:22:32 UTC
Created attachment 2217 [details]
updated patch

updated patch
Comment 10 Shaohua 2004-02-23 19:24:32 UTC
Attachments 1851 & 2217 combined can reslove the problem.
Comment 11 Dominik Brodowski 2004-03-26 00:56:31 UTC
*** Bug 2350 has been marked as a duplicate of this bug. ***
Comment 12 Shaohua 2004-04-15 01:40:39 UTC
Created attachment 2598 [details]
patch for 2.4 kernel

Attachement 2217 is for 2.6 kernel. I guess all platforms which use 'idle' from
a module will suffer the similar problem. But the patch only addes support for
IA64, IA32, and X86_64. It should be ported to other platforms.
Comment 13 Len Brown 2004-05-28 08:31:59 UTC
*** Bug 2705 has been marked as a duplicate of this bug. ***
Comment 14 Zhu Yi 2004-07-13 23:51:39 UTC
*** Bug 3013 has been marked as a duplicate of this bug. ***
Comment 15 Zhu Yi 2004-07-13 23:54:34 UTC
When will the patch be merged?
Comment 16 Zwane Mwaikambo 2004-07-20 08:43:02 UTC
Created attachment 3407 [details]
use synchronize_kernel to quiesce after changing idle function

Could you please also test this patch for me? Thanks
Comment 17 svetljo 2004-07-22 02:41:55 UTC
the synchronize_kernel patches fixes the problem for me

Distro: Mandrake cooker
hardware: Epox 8k9a3+ ( VIA KT400 )
Comment 18 Zwane Mwaikambo 2004-07-22 07:53:43 UTC
Thank you for confirming that, i feel that the previous patch may be a bit too
complex.
Comment 19 svetljo 2004-07-22 08:52:37 UTC
thanks for fixing it :-)

Note You need to log in before you can comment on or make changes to this bug.