Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] usage count misbehaviour with skystar2 / mt312 / dvb-coremodules



Hi,

I've found a problem with skystar2 / mt312 modules (DVB version 1.1.0) with the kernel 2.4.24.

Let's first insert the skystar2 module:

skynet:~# modprobe skystar2
skynet:~# lsmod
Module Size Used by Not tainted
skystar2 16640 0 (unused)
dvb-core 35204 0 [skystar2]

Then, inserting mt312:

skynet:~# modprobe mt312
skynet:~# lsmod
Module Size Used by Not tainted
mt312 4512 1
skystar2 16640 0 (unused)
dvb-core 35204 0 [mt312 skystar2]

and you can see that the mt312 usage count is 1 (?). I have not used any of the module facilities yet!.

If the mt312 module is inserted first, mt312 usage count is 0, then inserting skystar2, the mt312 usage counter raises to 1 (??).

After creating a new interface with dvbnet (dvb0_0), the lsmod output remains the same:

skynet:~# dvbnet -p 300

DVB Network Interface Manager
Version 1.1.0-TVF (Build Tue Feb 10 09:08:01 2004)
Copyright (C) 2003, TV Files S.p.A

Device: /dev/dvb/adapter0/net0
Status: device dvb0_0 for pid 300 created successfully.

skynet:~# ifconfig dvb0_0 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255
skynet:~# ifconfig
dvb0_0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING NOARP MULTICAST MTU:4096 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Base address:0x12c

skynet:~# lsmod
Module Size Used by Not tainted
mt312 4512 1
skystar2 16640 0 (unused)
dvb-core 35204 0 [mt312 skystar2]

Then, I can remove the skystar2 module without removing the interface just brought up (of course, its usage counter is 0!?!?):

skynet:~# rmmod skystar2
skynet:~# lsmod
Module Size Used by Not tainted
mt312 4512 0
dvb-core 35204 0 [mt312]

Look at the mt312 module usage counter, it has fallen down! As it is now 0, you can remove it from the kernel:

skynet:~# rmmod mt312
skynet:~# lsmod
Module Size Used by Not tainted
dvb-core 35204 0

and the same for dvb-core.

Obviously, this must have disastrous consecuences.
What if I run ifconfig?

skynet:~# ifconfig
Segmentation fault

skynet: ~# dmesg
...
Unable to handle kernel paging request at virtual address c8924064
printing eip:
c8924064
*pde = 011fb067
*pte = 00000000
Oops: 0000
CPU: 0
EIP: 0010:[<c8924064>] Not tainted
EFLAGS: 00010282
eax: c8924064 ebx: c53262ac ecx: 00000400 edx: 000001be
esi: c52d31be edi: 00000000 ebp: 00000000 esp: c52a7f3c
ds: 0018 es: 0018 ss: 0018
Process ifconfig (pid: 360, stackpage=c52a7000)
Stack: c01ae1dc c53262ac 000001be c53262ac c01ae2a4 c52d31be c53262ac 00000000
00000400 c52d3000 00000400 c01539cf c52d3000 c52a7f98 00000000 00000400
00000000 c546c7e0 ffffffea 00000400 c11e0d40 00000000 00000000 00000000
Call Trace: [<c01ae1dc>] [<c01ae2a4>] [<c01539cf>] [<c01359a6>] [<c01086d3>]

Code: Bad EIP value.

Finally, when rebooting the machine, a kernel panic is thrown.

Nice, isn't it?

(It have used the kernel source from the debian package at http://www.backports.org/debian, but it happened with kernel 2.4.22 too).



--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index