Mailing List archive

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

[linux-dvb] Re: usage count misbehaviour with skystar2 / mt312 / dvb-core modules



Niklas Peinecke wrote:
> Hernan A. Perez Masci wrote:
> >
> >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]
> 
> I'm not quite sure, which module's responsibility this is. Which 
> function calls should increase the respective module counts?
> 
> E.g. should each new call to dvb_start_feed increase the skystar2's 
> usage count and each call to dvb_stop_feed decrease it?
> 
> What about the frontends?

The frontend drivers register with the dvb_i2c system, and then
they probe on the bus for hardware and, if found, are attached
to the bus. The dvb_i2c core then increases the frontend module
use count.

IMHO this scheme is broken. E.g. you cannot unload frontend drivers
without unloading the bus driver. But it's tricky to get right.

The dvb_net unload Oops is different and should be fixed by
incrementing the usage count somewhere in dvb_net_add_if().

Patches are welcome.

Johannes


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



Home | Main Index | Thread Index