Mailing List archive

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

[linux-dvb] Re: [PATCH] Lock adapter modules when devices areopen



Johannes Stezenbach wrote:


I just gave it a try with 2.4 and it didn't work. I was able
to unload dvb-ttpci while szap was running, resulting in an
Oops when I interrupted szap.
I did testing on both 2.4 and 2.6 with two budget Nova-T cards. I'm sure I tried doing the same thing with tzap and it worked OK.

I assume that when you did the test you did remove and reload all the dvb modules, including dvb-core?

The locking is done by the try_module_get() in the generic dvb-core open() file operation, so I don't see how it can not get called when the device node gets opened. A couple of printk's should show whether the code gets run and whether the module pointer is set to something valid.
Perhaps adding a debug print of the module name would be appropriate.

The other possibility is that is locking the wrong module.

It looks like the dvb-ttpci module statically links the av7110 code, which should provide the correct module reference when it calls dvb_register_adapter().

The budget driver is divided into a common budget-core module and a card specific budget driver. It is the budget-core which does the dvb_register_adapter() call, but the budget driver which needs to get locked. I have to pass the module pointer from the budget driver to the budget-core.

Jon






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



Home | Main Index | Thread Index