All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KEYS: Revert one application of "Fix unreachable code" patch
@ 2013-02-20 12:24 David Howells
  2013-02-20 21:58 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2013-02-20 12:24 UTC (permalink / raw)
  To: torvalds; +Cc: jkosina, akpm, keyrings, linux-kernel

From: Alan Cox <alan@linux.intel.com>

A patch to fix some unreachable code in search_my_process_keyrings() got
applied twice by two different routes upstream:

	commit e67eab39bee26f509d38d00ca1a8f24b63f46a31
	Author: Alan Cox <alan@linux.intel.com>
	Date:   Thu Dec 20 15:05:54 2012 -0800
	keys: fix unreachable code

and:

	commit b010520ab3d2c05eb444ed5e01fe6c33842f597a
	Author: Alan Cox <alan@linux.intel.com>
	Date:   Thu Oct 25 15:23:35 2012 +0100
	keys: Fix unreachable code

Unfortunately, the second application removed something it shouldn't have and
this wasn't detected by GIT.  This is due to the patch not having sufficient
lines of context to distinguish the two places of application.

So revert the second application of the patch.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jiri Kosina <jkosina@suse.cz>
cc: Andrew Morton <akpm@linux-foundation.org>
---

 security/keys/process_keys.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c
index 20e4bf5..58dfe08 100644
--- a/security/keys/process_keys.c
+++ b/security/keys/process_keys.c
@@ -367,6 +367,8 @@ key_ref_t search_my_process_keyrings(struct key_type *type,
 
 		switch (PTR_ERR(key_ref)) {
 		case -EAGAIN: /* no key */
+			if (ret)
+				break;
 		case -ENOKEY: /* negative key */
 			ret = key_ref;
 			break;


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

* Re: [PATCH] KEYS: Revert one application of "Fix unreachable code" patch
  2013-02-20 12:24 [PATCH] KEYS: Revert one application of "Fix unreachable code" patch David Howells
@ 2013-02-20 21:58 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2013-02-20 21:58 UTC (permalink / raw)
  To: David Howells; +Cc: torvalds, jkosina, keyrings, linux-kernel

On Wed, 20 Feb 2013 12:24:32 +0000
David Howells <dhowells@redhat.com> wrote:

> A patch to fix some unreachable code in search_my_process_keyrings() got
> applied twice by two different routes upstream:
> 
> 	commit e67eab39bee26f509d38d00ca1a8f24b63f46a31
> 	Author: Alan Cox <alan@linux.intel.com>
> 	Date:   Thu Dec 20 15:05:54 2012 -0800
> 	keys: fix unreachable code
> 
> and:
> 
> 	commit b010520ab3d2c05eb444ed5e01fe6c33842f597a
> 	Author: Alan Cox <alan@linux.intel.com>
> 	Date:   Thu Oct 25 15:23:35 2012 +0100
> 	keys: Fix unreachable code
> 
> Unfortunately, the second application removed something it shouldn't have and
> this wasn't detected by GIT.  This is due to the patch not having sufficient
> lines of context to distinguish the two places of application.
> 
> So revert the second application of the patch.

The runtime effects of this aren't described, so I don't know whether
the omission of cc:stable was deliberate :(

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

end of thread, other threads:[~2013-02-20 21:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-20 12:24 [PATCH] KEYS: Revert one application of "Fix unreachable code" patch David Howells
2013-02-20 21:58 ` Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.