Commit 27d6379894be4a81984da4d48002196a83939ca9

Authored by Andi Kleen
Committed by Linus Torvalds
1 parent 765aaafe38

Fix install_process_keyring error handling

Fix an 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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

security/keys/process_keys.c
... ... @@ -207,7 +207,7 @@
207 207 ret = install_process_keyring_to_cred(new);
208 208 if (ret < 0) {
209 209 abort_creds(new);
210   - return ret != -EEXIST ?: 0;
  210 + return ret != -EEXIST ? ret : 0;
211 211 }
212 212  
213 213 return commit_creds(new);