Skip to content

Commit

Permalink
kernel/sys.c: fix compat uname machine
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
andreas-schwab authored and torvalds committed Apr 24, 2010
1 parent fb2162d commit 46da276
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 46da276

Please sign in to comment.