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]
Message-ID: <20121217131523.2974.74337.stgit@warthog.procyon.org.uk>
Date:	Mon, 17 Dec 2012 13:15:23 +0000
From:	David Howells <dhowells@...hat.com>
To:	torvalds@...ux-foundation.com
Cc:	linux-security-module@...r.kernel.org,
	Alan Cox <alan@...ux.intel.com>, jmorris@...ei.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] keys: Fix unreachable code

From: Alan Cox <alan@...ux.intel.com>

We set ret to NULL then test it. Remove the bogus test

Signed-off-by: Alan Cox <alan@...ux.intel.com>
Signed-off-by: David Howells <dhowells@...hat.com>
---

 security/keys/process_keys.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c
index 58dfe08..20e4bf5 100644
--- a/security/keys/process_keys.c
+++ b/security/keys/process_keys.c
@@ -367,8 +367,6 @@ key_ref_t search_my_process_keyrings(struct key_type *type,
 
 		switch (PTR_ERR(key_ref)) {
 		case -EAGAIN: /* no key */
-			if (ret)
-				break;
 		case -ENOKEY: /* negative key */
 			ret = key_ref;
 			break;

--
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