Re: module unload deadlock

From: Andrea Arcangeli
Date: Wed Feb 18 2004 - 10:42:20 EST


On Wed, Feb 18, 2004 at 04:35:55AM +0000, viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:
> On Wed, Feb 18, 2004 at 02:29:21PM +1100, Rusty Russell wrote:
> > > the actual module doing request_modules in the cleanup handler is
> > > parport_pc, calling parport_enumerate (it calls it for another reason,
> > > and parport enumerate is told to load up a lowlevel driver if none was
> > > present, that's worthless for the unload routine but it's useful for all
> > > other calls of parport_enumerate). It's uncertain if other drivers
>
> Bullshit. Other calls of parport_enumerate() must die - along with that one.
> Patches will go to akpm tomorrow.

It's clear this could be fixed by making sure parport won't call
request_module from cleanup_module, the primary reason I fixed it in the
module code is that I don't know if other drivers are doing this, do
you? What parport did was legitimate, and it was working fine in the
past, sure the parport code could be made slightly more complex and
aware about the fact it doesn't worth to try loading the lowlevel module
in cleanup_exit, but it wasn't obviously wrong, the cleanup/init module
are slow paths, it didn't matter if parport tried to load a lowlevel
module there.
-
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/