1.3.69: Kernel oops while unloading SLIP module

Fritz Ganter (ganter@rebekka.tu-graz.ac.at)
Wed, 28 Feb 1996 10:52:02 +0100 (MET)


Hello list, hello god!

If I compile SLIP as module and it is to unload (either with kerneld or
rmmod) then I get an oops:

Unable to handle kernel NULL pointer dereference at virtual address c0000085
current->tss.cr3 = 0130e000,
*pde = 00102067
*pte = 00000027
Oops: 0000
CPU: 0
EIP: 0010:[<0182b270>]
EFLAGS: 00010216
eax: 004a4810 ebx: 00000001 ecx: 00a97b18 edx: 00000000
esi: 08000ad8 edi: bffffb50 ebp: bffffe44 esp: 0130ff6c
ds: 0018 es: 0018 fs: 002b gs: 002b ss: 0018
Process kerneld (pid: 20, process nr: 6, stackpage=0130f000)
Stack: 00a97998 00114612 01348414 bffffe0c bffffdfc 0000000c 00000404 00000000
fffffffc 00000000 00000000 4001c241 00000023 00000202 bffffdfc 0000002b
00000000 00000000 00000000 0010a549 00000000 00000000 40001f70 08000ad8
Call Trace: [<00114612>] [<0010a549>]
Code: 8a 82 85 00 00 00 84 c0 74 1a 8d 42 6c 50 e8 9d 76 94 fe a1

I did something with ksymoops, but don't know if it is right:
rebekka:~$ /usr/src/linux/scripts/ksymoops /System.map <~ganter/x
Using `/System.map' to map addresses to symbols.

Trace: 114612 <sys_delete_module+e2/100>
Trace: 10a549 <system_call+59/a0>

Code: movb 0x85(%edx),%al
Code: testb %al,%al
Code: je 00000024 <_EIP+24>
Code: leal 0x6c(%edx),%eax
Code: pushl %eax
Code: call fe9476b0 <gcc2_compiled.+fe9476b0>
Code: movl 0x90909000,%eax
-------------------------------------------------------------------

If I REVERSE following patch from 1.3.69 then it went ok:

@@ -1329,7 +1335,9 @@
{
for (i = 0; i < slip_maxdev; i++)
{
- if (slip_ctrls[i] != NULL)
+ if (slip_ctrls[i]->dev.start)
+ /* VSV = if dev->start==0, then device
+ unregistred while close proc. */
{
unregister_netdev(&(slip_ctrls[i]->dev));
kfree(slip_ctrls[i]);

Fritz "who dances with the Linux" Ganter.

Fritz Ganter Graz, Austria
WWW: http://fvkma.tu-graz.ac.at/ganter/ganter.html
Email: ganter@fvkma.tu-graz.ac.at
HAM-Radio: OE6FAD@OE6XYG.AUT.EU,OE6FAD@OE6FAD.AMPR.ORG, Tel. +43 316-688112
**************** Linux... try it, use it, love it. *****************