[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20101028112424.3372.63923.stgit@warthog.procyon.org.uk>
Date: Thu, 28 Oct 2010 12:24:24 +0100
From: David Howells <dhowells@...hat.com>
To: torvalds@...l.org, akpm@...ux-foundation.com
Cc: linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] Fix install_process_keyring error handling
From: Andi Kleen <ak@...ux.intel.com>
Fix incorrect error check that returns 1 for error
instead of the expected error code.
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
Signed-off-by: David Howells <dhowells@...hat.com>
---
security/keys/process_keys.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c
index f8e7251..504bdd2 100644
--- a/security/keys/process_keys.c
+++ b/security/keys/process_keys.c
@@ -207,7 +207,7 @@ static int install_process_keyring(void)
ret = install_process_keyring_to_cred(new);
if (ret < 0) {
abort_creds(new);
- return ret != -EEXIST ?: 0;
+ return ret != -EEXIST ? ret : 0;
}
return commit_creds(new);
--
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