summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2006-08-13 00:53:29 +0100
committerRalf Baechle <ralf@linux-mips.org>2006-10-19 17:55:13 +0100
commit53571ce47010562f5e67782ea00206f379a5cd65 (patch)
treed4d7fab63eeaa41b92df4624cf20f213d39f7aa7 /arch/mips
parent36d98e79b798fb27e38b9be4f36c5a96025f9281 (diff)
downloadlinux-53571ce47010562f5e67782ea00206f379a5cd65.tar.bz2
[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')
-rw-r--r--arch/mips/kernel/linux32.c4
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)
asmlinkage int sys32_personality(unsigned long personality)
{
int ret;
- if (current->personality == PER_LINUX32 && personality == PER_LINUX)
+ personality &= 0xffffffff;
+ if (personality(current->personality) == PER_LINUX32 &&
+ personality == PER_LINUX)
personality = PER_LINUX32;
ret = sys_personality(personality);
if (ret == PER_LINUX32)