From: David Howells on
From: Dan Carpenter <error27(a)gmail.com>

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>
---

security/keys/process_keys.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c
index 06c2ccf..20a38fe 100644
--- 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/
From: Greg KH on
On Tue, May 18, 2010 at 08:51:43AM +1000, James Morris wrote:
> On Mon, 17 May 2010, David Howells wrote:
>
> > From: Dan Carpenter <error27(a)gmail.com>
> >
> > 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>
>
> Queued for Linus -- is also likely a -stable candidate.

If so, please just put a:
Cc: stable <stable(a)kernel.org>
to the signed-off-by area of the patch. That way I automatically get
notified when it goes into Linus's tree, and I don't have to go dig and
try to match up a random email reference like this one with the actual
patch in Linus's tree...

thanks,

greg k-h
--
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/