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-prev] [day] [month] [year] [list]
Date:   Tue, 29 Jan 2019 11:19:33 -0800
From:   tip-bot for Greg Kroah-Hartman <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     peterz@...radead.org, tglx@...utronix.de, dvhart@...radead.org,
        mingo@...nel.org, linux-kernel@...r.kernel.org,
        gregkh@...uxfoundation.org, hpa@...or.com
Subject: [tip:locking/core] futex: No need to check return value of
 debugfs_create functions

Commit-ID:  0365aeba50841e087b3d6a0eca1bddccc5e650c8
Gitweb:     https://git.kernel.org/tip/0365aeba50841e087b3d6a0eca1bddccc5e650c8
Author:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
AuthorDate: Tue, 22 Jan 2019 16:21:39 +0100
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Tue, 29 Jan 2019 20:15:48 +0100

futex: No need to check return value of debugfs_create functions

When calling debugfs functions, there is no need to ever check the return
value.  The function can work or not, but the code logic should never do
something different based on this.

Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Darren Hart (VMware) <dvhart@...radead.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Link: https://lkml.kernel.org/r/20190122152151.16139-40-gregkh@linuxfoundation.org

---
 kernel/futex.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/kernel/futex.c b/kernel/futex.c
index fdd312da0992..69e619baf709 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -321,12 +321,8 @@ static int __init fail_futex_debugfs(void)
 	if (IS_ERR(dir))
 		return PTR_ERR(dir);
 
-	if (!debugfs_create_bool("ignore-private", mode, dir,
-				 &fail_futex.ignore_private)) {
-		debugfs_remove_recursive(dir);
-		return -ENOMEM;
-	}
-
+	debugfs_create_bool("ignore-private", mode, dir,
+			    &fail_futex.ignore_private);
 	return 0;
 }
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ