Re: 2.4.0-test2-pre11 fails on loading 3c59x.o

From: Andrew Morton (andrewm@uow.edu.au)
Date: Fri Jun 23 2000 - 07:34:04 EST


sysuh@kigam.re.kr wrote:
>
> Sorry for the wrong report.

Actually... You should have seen "No such device", not "Device or resource busy".

Why does sys_init_module() stomp on the module constructor's return value?

--- linux-2.4.0-test2-pre9/kernel/module.c Thu Jun 22 20:41:33 2000
+++ linux-akpm/kernel/module.c Fri Jun 23 22:30:00 2000
@@ -326,10 +326,11 @@
         /* Initialize the module. */
         mod->flags |= MOD_INITIALIZING;
         atomic_set(&mod->uc.usecount,1);
- if (mod->init && mod->init() != 0) {
+ if (mod->init && (error = mod->init()) != 0) {
                 atomic_set(&mod->uc.usecount,0);
                 mod->flags &= ~MOD_INITIALIZING;
- error = -EBUSY;
+ if (error > 0) /* Buggy module */
+ error = -EBUSY;
                 goto err0;
         }
         atomic_dec(&mod->uc.usecount);

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



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:26 EST