* [PATCH] Fix install_process_keyring error handling
@ 2010-10-25 22:31 Andi Kleen
2010-10-26 18:13 ` David Howells
0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2010-10-25 22:31 UTC (permalink / raw)
To: dhowells; +Cc: linux-kernel, keyrings, Andi Kleen
From: Andi Kleen <ak@linux.intel.com>
Fix incorrect error check that returns 1 for error
instead of the expected error code.
Signed-off-by: Andi Kleen <ak@linux.intel.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);
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix install_process_keyring error handling
2010-10-25 22:31 [PATCH] Fix install_process_keyring error handling Andi Kleen
@ 2010-10-26 18:13 ` David Howells
0 siblings, 0 replies; 4+ messages in thread
From: David Howells @ 2010-10-26 18:13 UTC (permalink / raw)
To: Andi Kleen; +Cc: dhowells, linux-kernel, keyrings, Andi Kleen
Andi Kleen <andi@firstfloor.org> wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> Fix incorrect error check that returns 1 for error
> instead of the expected error code.
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Good catch.
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Fix install_process_keyring error handling
@ 2010-10-28 12:16 David Howells
0 siblings, 0 replies; 4+ messages in thread
From: David Howells @ 2010-10-28 12:16 UTC (permalink / raw)
To: torvalds, akpm; +Cc: linux-security-module, linux-kernel
From: Andi Kleen <ak@linux.intel.com>
Fix incorrect error check that returns 1 for error
instead of the expected error code.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: David Howells <dhowells@redhat.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);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] Fix install_process_keyring error handling
@ 2010-10-28 11:24 David Howells
0 siblings, 0 replies; 4+ messages in thread
From: David Howells @ 2010-10-28 11:24 UTC (permalink / raw)
To: torvalds, akpm; +Cc: linux-security-module, linux-kernel
From: Andi Kleen <ak@linux.intel.com>
Fix incorrect error check that returns 1 for error
instead of the expected error code.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: David Howells <dhowells@redhat.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);
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-28 12:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-25 22:31 [PATCH] Fix install_process_keyring error handling Andi Kleen
2010-10-26 18:13 ` David Howells
2010-10-28 11:24 David Howells
2010-10-28 12:16 David Howells
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).