public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KEYS: Return more accurate error codes
@ 2010-05-17 13:42 David Howells
  2010-05-17 22:51 ` James Morris
  0 siblings, 1 reply; 3+ messages in thread
From: David Howells @ 2010-05-17 13:42 UTC (permalink / raw)
  To: torvalds, akpm
  Cc: jmorris, oleg, keyrings, linux-security-module, linux-kernel,
	Dan Carpenter, David Howells

From: Dan Carpenter <error27@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@gmail.com>
Signed-off-by: David Howells <dhowells@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:


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] KEYS: Return more accurate error codes
  2010-05-17 13:42 [PATCH] KEYS: Return more accurate error codes David Howells
@ 2010-05-17 22:51 ` James Morris
  2010-05-24 21:43   ` [stable] " Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: James Morris @ 2010-05-17 22:51 UTC (permalink / raw)
  To: David Howells
  Cc: torvalds, Andrew Morton, Oleg Nesterov, keyrings,
	linux-security-module, linux-kernel, Dan Carpenter, stable

On Mon, 17 May 2010, David Howells wrote:

> From: Dan Carpenter <error27@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@gmail.com>
> Signed-off-by: David Howells <dhowells@redhat.com>

Queued for Linus -- is also likely a -stable candidate.


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

-- 
James Morris
<jmorris@namei.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [stable] [PATCH] KEYS: Return more accurate error codes
  2010-05-17 22:51 ` James Morris
@ 2010-05-24 21:43   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2010-05-24 21:43 UTC (permalink / raw)
  To: James Morris
  Cc: David Howells, keyrings, Dan Carpenter, linux-security-module,
	linux-kernel, torvalds, Oleg Nesterov, Andrew Morton, stable

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@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@gmail.com>
> > Signed-off-by: David Howells <dhowells@redhat.com>
> 
> Queued for Linus -- is also likely a -stable candidate.

If so, please just put a:
	Cc: stable <stable@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-24 22:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-17 13:42 [PATCH] KEYS: Return more accurate error codes David Howells
2010-05-17 22:51 ` James Morris
2010-05-24 21:43   ` [stable] " Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox