Re: [RFC] race in request_module()

From: Alexander Viro (viro@math.psu.edu)
Date: Mon Apr 22 2002 - 20:05:56 EST


On Mon, 22 Apr 2002, Matthew Dharm wrote:

> Isn't the real problem here that we've got a "rogue" running around
> removing things that we might be about to use?
>
> Yes, I think that request_module() should indicate to the caller if
> something "suitable" was found. But I think having rmmod -a running around
> sweeping things randomly is bad.
>
> Perhaps what we need is a way to tell _how_long_ago_ the count on a module
> last changed. Thus, rmmod -a could decide to only remove modules that were
> last used more than an hour ago, or somesuch. Push the policy question into
> userspace.

Still doesn't solve the problem. And BTW, there are userland races of
similar kind - foo.o depends on bar.o, modprobe loads bar.o, goes to look
for foo.o and gets bar.o removed from under it.

The thing being, relying on time doesn't help - e.g. we might have modules
on automounted volume and delays may be really long if the thing happens
at time when load is high.

-
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/



This archive was generated by hypermail 2b29 : Tue Apr 23 2002 - 22:00:34 EST