Re: [RFC] race in request_module()

From: Keith Owens (kaos@ocs.com.au)
Date: Mon Apr 22 2002 - 22:30:49 EST


On Mon, 22 Apr 2002 20:49:40 -0400 (EDT),
Alexander Viro <viro@math.psu.edu> wrote:
> Looks like request_module() has quite a few problems:
>
>* there is no way to distinguish between failing modprobe and successful
> one followed by rmmod -a (e.g. called by cron). For one thing, we
> don't pass exit value of modprobe to caller of request_module().

There is no such thing as a failing modprobe. It either works and the
module is loaded or modprobe does not work and the module is not
loaded. This excludes the case where a module oops during init, but
that is not what you are worried about.

When a module is loaded, it is marked !MOD_USED_ONCE. An explicit
rmmod will get rid of the module but rmmod -a will not. rmmod -a will
not remove a module unless __MOD_INC_USE_COUNT has been issued on the
module at least once, or the module is loaded to satisfy unresolved
symbols from another module.

Rusty and I have a completely new design for module loading and
unloading in 2.5, we believe it is race free. I do not have time to
work on the new design until I have got kbuild 2.5 into the kernel.

-
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