mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-16 18:26:42 +00:00
Fix install_process_keyring error handling
commit 27d6379894be4a81984da4d48002196a83939ca9 upstream. 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> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
This commit is contained in:
parent
000e338c28
commit
14424d7169
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user