On Sat, Sep 29, 2007 at 07:06:53PM +0900, Akinobu Mita wrote:
> load_module() returns zero when mod_sysfs_init() fails,
> then the module loading will succeed accidentally.
>
> This patch makes load_module() return error correctly in that case.
>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: Rusty Russell <[email protected]>
> Signed-off-by: Akinobu Mita <[email protected]>
>
> ---
> kernel/module.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Index: 2.6-git/kernel/module.c
> ===================================================================
> --- 2.6-git.orig/kernel/module.c
> +++ 2.6-git/kernel/module.c
> @@ -1782,7 +1782,8 @@ static struct module *load_module(void _
> module_unload_init(mod);
>
> /* Initialize kobject, so we can reference it. */
> - if (mod_sysfs_init(mod) != 0)
> + err = mod_sysfs_init(mod);
> + if (err)
> goto cleanup;
I must be still asleep this morning, but I think this patch does the
exact same thing as the original code does, right? Otherwise, this
code would always be failing.
Or do I just need to go get my morning coffee to wake up and see the
problem here?
thanks,
greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]