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]
Message-ID: <20150409090308.GB17605@mwanda>
Date:	Thu, 9 Apr 2015 12:03:08 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	"Theodore Ts'o" <tytso@....edu>,
	Michael Halcrow <mhalcrow@...gle.com>
Cc:	Andreas Dilger <adilger.kernel@...ger.ca>,
	linux-ext4@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch] ext4 crypto: fix an error code in ext4_init_crypto()

The callers don't care about the error so it doesn't make a difference,
but static checkers complain so let's return an error code here.

Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

diff --git a/fs/ext4/crypto.c b/fs/ext4/crypto.c
index 226e07f..6110ccd 100644
--- a/fs/ext4/crypto.c
+++ b/fs/ext4/crypto.c
@@ -233,7 +233,7 @@ void ext4_exit_crypto(void)
  */
 int ext4_init_crypto(void)
 {
-	int i, res = 0;
+	int i, res;
 
 	mutex_lock(&crypto_init);
 	if (ext4_read_workqueue)
@@ -257,8 +257,10 @@ int ext4_init_crypto(void)
 
 	ext4_bounce_page_pool =
 		mempool_create_page_pool(num_prealloc_crypto_pages, 0);
-	if (!ext4_bounce_page_pool)
+	if (!ext4_bounce_page_pool) {
+		res = -ENOMEM;
 		goto fail;
+	}
 already_initialized:
 	mutex_unlock(&crypto_init);
 	return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ