Commit 46da2766 authored by Andreas Schwab's avatar Andreas Schwab Committed by Linus Torvalds

kernel/sys.c: fix compat uname machine

On ppc64 you get this error:

  $ setarch ppc -R true
  setarch: ppc: Unrecognized architecture

because uname still reports ppc64 as the machine.

So mask off the personality flags when checking for PER_LINUX32.
Signed-off-by: default avatarAndreas Schwab <schwab@linux-m68k.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fb2162df
...@@ -1118,7 +1118,7 @@ DECLARE_RWSEM(uts_sem); ...@@ -1118,7 +1118,7 @@ DECLARE_RWSEM(uts_sem);
#ifdef COMPAT_UTS_MACHINE #ifdef COMPAT_UTS_MACHINE
#define override_architecture(name) \ #define override_architecture(name) \
(current->personality == PER_LINUX32 && \ (personality(current->personality) == PER_LINUX32 && \
copy_to_user(name->machine, COMPAT_UTS_MACHINE, \ copy_to_user(name->machine, COMPAT_UTS_MACHINE, \
sizeof(COMPAT_UTS_MACHINE))) sizeof(COMPAT_UTS_MACHINE)))
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment