]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Catch module parameter parsing failures
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 11 Jan 2005 11:18:21 +0000 (03:18 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 11 Jan 2005 11:18:21 +0000 (03:18 -0800)
Radheka Godse <radheka.godse@intel.com> pointed out that parameter parsing
failures allow a module still to be loaded.  Trivial fix.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/module.c

index f44ebfd656c686a7f0c08a16ee77a3e8bd3a26fe..ce427b675b98fabef11d843306baa301f784928b 100644 (file)
@@ -1691,6 +1691,9 @@ static struct module *load_module(void __user *umod,
                                 / sizeof(struct kernel_param),
                                 NULL);
        }
+       if (err < 0)
+               goto arch_cleanup;
+
        err = mod_sysfs_setup(mod, 
                              (struct kernel_param *)
                              sechdrs[setupindex].sh_addr,