Prev: [06/23] powerpc/oprofile: fix potential buffer overrun in op_model_cell.c
Next: [23/23] sctp: fix append error cause to ERROR chunk correctly
From: Greg KH on 1 Jul 2010 14:20 2.6.27-stable review patch. If anyone has any objections, please let us know. ------------------ From: Dan Carpenter <error27(a)gmail.com> commit 4d09ec0f705cf88a12add029c058b53f288cfaa2 upstream. We were using the wrong variable here so the error codes weren't being returned properly. The original code returns -ENOKEY. Signed-off-by: Dan Carpenter <error27(a)gmail.com> Signed-off-by: David Howells <dhowells(a)redhat.com> Signed-off-by: James Morris <jmorris(a)namei.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de> --- a/security/keys/process_keys.c +++ b/security/keys/process_keys.c @@ -508,7 +508,7 @@ try_again: ret = install_thread_keyring(); if (ret < 0) { - key = ERR_PTR(ret); + key_ref = ERR_PTR(ret); goto error; } goto reget_creds; @@ -526,7 +526,7 @@ try_again: ret = install_process_keyring(); if (ret < 0) { - key = ERR_PTR(ret); + key_ref = ERR_PTR(ret); goto error; } goto reget_creds; @@ -585,7 +585,7 @@ try_again: case KEY_SPEC_GROUP_KEYRING: /* group keyrings are not yet supported */ - key = ERR_PTR(-EINVAL); + key_ref = ERR_PTR(-EINVAL); goto error; case KEY_SPEC_REQKEY_AUTH_KEY: -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |