Re: [PATCH] Make agpsupport work with modversions

From: Keith Owens (kaos@ocs.com.au)
Date: Wed Oct 18 2000 - 20:06:41 EST


On Thu, 19 Oct 2000 01:56:38 +0100 (BST),
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>Keith Owens wrote
>> modprobe would attempt to satisfy weak external references as if they
>> were normal references, including all the module dependency chains and
>> reference counts. If the reference cannot be satisfied, it is set to
>> zero instead of causing an error. No changes to load/unload.
>
>I dont believe modprobe can do this race free in userspace

Module dependency checking in userspace has always been racy. A is
being loaded and needs a symbol from B. B was loaded at the start of
insmod so the symbol was resolved. By the time A is actually loaded, B
has been removed, userspace race. This is checked for in
sys_init_module()

        printk(KERN_ERR "init_module: found dependency that is "
                        "(no longer?) a module.\n");

Making some of the external references weak makes no difference.
Either they are resolved to a module by insmod and checked by
sys_init_module() or insmod replaces the reference with NULL.

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



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:14 EST