Messages in this thread | | | Date | Thu, 18 Nov 2004 20:05:59 +0100 | From | Takashi Iwai <> | Subject | Re: modprobe + request_module() deadlock |
| |
At Thu, 18 Nov 2004 14:55:22 +0100, Johannes Stezenbach wrote: > > On Thu, Nov 18, 2004 at 02:48:22PM +1100, Rusty Russell wrote: > > On Wed, 2004-11-17 at 23:29 +0100, Johannes Stezenbach wrote: > > > Hi, > > > > > > it seems that modprobe in newer versions of module-init-tools > > > (here: 3.1-pre6) gets an exclusive lock on the module's .ko file: > > > > > > struct flock lock; > > > lock.l_type = F_WRLCK; > > > lock.l_whence = SEEK_SET; > > > lock.l_start = 0; > > > lock.l_len = 1; > > > fcntl(fd, F_SETLKW, &lock); > > > > > > This leads to a deadlock when the loaded module calls > > > request_module() in its module_init() function, to load > > > a module which in turn depends on the first module. > > > > My bug, I think. Does this help? > > Yes and no. The deadlock is gone, but now I get:
IIRC, request_module() in module_init() doesn't work any more in general.
A weak linking like i2c doesn't provide the module dependency, so modprobe can't load it by itself, so far. I see the same problem in ALSA snd-powermac module.
Can we add a module dependency manually somehow?
-- Takashi Iwai <tiwai@suse.de> ALSA Developer - www.alsa-project.org - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |