mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
[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>
This commit is contained in:
parent
36d98e79b7
commit
53571ce470
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue