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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 17 Jun 2014 22:29:02 +0800
From:	Jeff Liu <jeff.liu@...cle.com>
To:	herbert@...dor.apana.org.au, davem@...emloft.net
CC:	linux-crypto@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 06/24] crypt: return actual error code on pcrypt_init

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

Return the actual error code if call kset_create_and_add() failed

Cc: Herbert Xu <herbert@...dor.apana.org.au>
Cc: David S. Miller" <davem@...emloft.net>
Signed-off-by: Jie Liu <jeff.liu@...cle.com>
---
 crypto/pcrypt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c
index 309d345..053fb10 100644
--- a/crypto/pcrypt.c
+++ b/crypto/pcrypt.c
@@ -523,11 +523,13 @@ static struct crypto_template pcrypt_tmpl = {
 
 static int __init pcrypt_init(void)
 {
-	int err = -ENOMEM;
+	int err;
 
 	pcrypt_kset = kset_create_and_add("pcrypt", NULL, kernel_kobj);
-	if (!pcrypt_kset)
+	if (IS_ERR(pcrypt_kset)) {
+		err = PTR_ERR(pcrypt_kset);
 		goto err;
+	}
 
 	err = pcrypt_init_padata(&pencrypt, "pencrypt");
 	if (err)
-- 
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