Re: Deadlock patch for kmod

Greg Zornetzer (gaz@andrew.cmu.edu)
Thu, 23 Apr 1998 00:22:00 -0400 (EDT)


On Thu, 23 Apr 1998, Richard Gooch wrote:

> Kevin Lentin writes:
> > On Thu, Apr 23, 1998 at 11:34:10AM +1000, Richard Gooch wrote:
> > > Hi, Linus. Below is a small patch that should fix a nasty deadlock
> > > with kmod: if a modprobe initiated by kmod does something that
> > > triggers another module load request via kmod, we have a deadlock. I
> > > hope I've got the process killing semantics correct.
> >
> > Is this the same problem that prevents the module probve for
> > scsi_hostadapter not to work. I've checked and the call is being made, but
> > modprobe just never gets called. I presumed it was because the
> > initailisation of one module is calling another.
>
> I'm not sure. It will detect the case where a kmod initiated modprobe
> causes the loading module to attempt another module load via kmod.
> Apply the patch and tell us :-)
>
This is exactly the case - I imagine that modprobe will get quite pissed
off when it gets nuked while init_module is still being run. This problem
is dealt with by the the "daemonless" kmod that Adam Richter wrote -
instead of killing the already running modprobe, we run another copy.
Only problem seems to be the signal handling weirdness on alphas being
discussed currently on linux-kernel, and I believe a patch was just made
for it. I'd suggest testing that patch as it allows the old kerneld
multiple-loading functionality, and removes the overhead (and signalling
annoyances) of running kmod as a daemon.

Greg Zornetzer - gaz+@andrew.cmu.edu
"Light shines brightest in the darkest night"
http://www.contrib.andrew.cmu.edu/~gaz

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu