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:	Tue, 17 Jun 2014 22:29:07 +0800
From:	Jeff Liu <jeff.liu@...cle.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Christoph Lameter <cl@...two.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 07/24] kernel: return actual error on param_sysfs_init

From: Jie Liu <jeff.liu@...cle.com>

Return the actual error code if kset_create_and_add() failed

Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Christoph Lameter <cl@...ux-foundation.org>
Signed-off-by: Jie Liu <jeff.liu@...cle.com>
---
 kernel/params.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/kernel/params.c b/kernel/params.c
index 1e52ca2..a110987 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -928,10 +928,9 @@ struct kobj_type module_ktype = {
 static int __init param_sysfs_init(void)
 {
 	module_kset = kset_create_and_add("module", &module_uevent_ops, NULL);
-	if (!module_kset) {
-		printk(KERN_WARNING "%s (%d): error creating kset\n",
-			__FILE__, __LINE__);
-		return -ENOMEM;
+	if (IS_ERR(module_kset)) {
+		pr_warn("%s (%d): error creating kset\n", __FILE__, __LINE__);
+		return PTR_ERR(module_kset);
 	}
 	module_sysfs_initialized = 1;
 
-- 
1.8.3.2
--
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