lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 29 Sep 2007 19:06:53 +0900
From:	Akinobu Mita <akinobu.mita@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Greg Kroah-Hartman <gregkh@...e.de>,
	Rusty Russell <rusty@...tcorp.com.au>
Subject: [PATCH] module: return error when mod_sysfs_init() failed

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 <gregkh@...e.de>
Cc: Rusty Russell <rusty@...tcorp.com.au>
Signed-off-by: Akinobu Mita <akinobu.mita@...il.com>

---
 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;
 
 	/* Set up license info based on the info section */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ