diff options
author | Thiemo Seufer <ths@networkno.de> | 2006-08-12 19:53:29 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-10-19 12:55:13 -0400 |
commit | 53571ce47010562f5e67782ea00206f379a5cd65 (patch) | |
tree | d4d7fab63eeaa41b92df4624cf20f213d39f7aa7 /arch/mips/kernel/linux32.c | |
parent | 36d98e79b798fb27e38b9be4f36c5a96025f9281 (diff) |
[MIPS] Fix O32 personality(2) call with 0xffffffff argument.
A sign extension bug did result in sys_personality being invoked with a
0xffffffffffffffffUL argument, so querying the current personality didn't
work.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/linux32.c')
-rw-r--r-- | arch/mips/kernel/linux32.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index 53f4171fc188..7a3ebbeba1f3 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -1055,7 +1055,9 @@ asmlinkage long sys32_newuname(struct new_utsname __user * name) | |||
1055 | asmlinkage int sys32_personality(unsigned long personality) | 1055 | asmlinkage int sys32_personality(unsigned long personality) |
1056 | { | 1056 | { |
1057 | int ret; | 1057 | int ret; |
1058 | if (current->personality == PER_LINUX32 && personality == PER_LINUX) | 1058 | personality &= 0xffffffff; |
1059 | if (personality(current->personality) == PER_LINUX32 && | ||
1060 | personality == PER_LINUX) | ||
1059 | personality = PER_LINUX32; | 1061 | personality = PER_LINUX32; |
1060 | ret = sys_personality(personality); | 1062 | ret = sys_personality(personality); |
1061 | if (ret == PER_LINUX32) | 1063 | if (ret == PER_LINUX32) |