Re: [patch] Re: rmmod -a does not unload unused modules in 2.2.x

Tuukka Toivonen (tuukkat@ees2.oulu.fi)
Thu, 25 Nov 1999 01:51:54 +0200 (EET)


On Thu, 25 Nov 1999, Keith Owens wrote:

> kernel needs a module, calls kmod
> kmod does modprobe -k module_name
> crond kicks in with rmmod -a (see Documentation/kmod.txt)
> *** With your patch, unused modules are removed ***
> kernel uses module that it thought was loaded but has been removed, splat!

Yes, I see the race condition now. However, I still feel my patch is
correct (in theory) and what is also needed with it, is a some kind of user
space lock (a lock file, for example).

>find out why you are loading modules marked as autoclean but not using
>them.

Ok, this is as good solution as my patch, in practise. In theory, though, I
find it strange that modules marked "(autoclean)" are not autocleaned if
they happen to be also "(unused)" -- for whatever reason.

I had this situation a while ago, but I don't know/remember why. Right now
I cannot think about any legitimate reason for unused modules.

--
| Tuukka Toivonen <tuukkat@ee.oulu.fi>       [PGP public key
| Homepage: http://www.ee.oulu.fi/~tuukkat/       available]
| Try also finger -l tuukkat@ee.oulu.fi
| Studying information engineering at the University of Oulu
+-----------------------------------------------------------

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