Re: modprobe + request_module() deadlock

From: Johannes Stezenbach
Date: Mon Nov 22 2004 - 11:33:19 EST


On Mon, Nov 22, 2004 at 03:44:33PM +0100, Gerd Knorr wrote:
> > The saa7146 driver seems to have a working solution for this
> > problem: The PCI ids are registered to the subdrivers (e.g. dvb-ttpci
> > or mxb) so that these are loaded via hotplug. They then register to the
> > saa7146 core as an "extension" module, and the core then does the probing.
> > Grep for saa7146_register_extension().
>
> That would be kida ugly because I'd need a dummy module then for the
> cards which need neither saa7134-empress nor saa7134-dvb (which is true
> for most of the existing cards btw).

You already have a saa7134-cards.c which you could turn
into a seperate module. I doubt users would care if they need
saa7134.o only or an additional module, if hotplug takes
care of loading them.

> I can fix that in the driver, by delaying the request_module() somehow
> until the saa7134 module initialization is finished. I don't think that
> this is a good idea through as it looks like I'm not the only one with
> that problem ...

Delaying request_module() sounds ugly. Anyway, if you can
get it to work reliably...

Actually dvb-bt8xx.ko has a similar problem (no hotplug for DVB). It
uses bttv_sub_register(), though, but this doesn't do probing
and the PCI ids have to be in bttv-cards.c. It would be nicer
if dvb-bt8xx.ko could use a similar mechanism as dvb-ttpci.ko.
Or do you plan to add request_module("dvb-bt8xx") in bttv-driver.c?

And how about cx88 (I haven't checked this)?


Johannes
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/