diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2010-04-23 13:17:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-24 11:31:24 -0700 |
commit | 46da27664887fb95cedba53eafcf876de812c8c1 (patch) | |
tree | 5a2ee7566cacfeaef874a3306922c40b5d897294 /kernel/sys.c | |
parent | fb2162df74bb19552db3d988fd11c787cf5fad56 (diff) | |
download | linux-46da27664887fb95cedba53eafcf876de812c8c1.tar.gz linux-46da27664887fb95cedba53eafcf876de812c8c1.tar.bz2 linux-46da27664887fb95cedba53eafcf876de812c8c1.zip |
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: Andreas Schwab <schwab@linux-m68k.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 6d1a7e0f9d5b..7cb426a58965 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -1118,7 +1118,7 @@ DECLARE_RWSEM(uts_sem); #ifdef COMPAT_UTS_MACHINE #define override_architecture(name) \ - (current->personality == PER_LINUX32 && \ + (personality(current->personality) == PER_LINUX32 && \ copy_to_user(name->machine, COMPAT_UTS_MACHINE, \ sizeof(COMPAT_UTS_MACHINE))) #else |