Skip to content

Commit

Permalink
[S390] fix s390x_newuname
Browse files Browse the repository at this point in the history
The uname system call for 64 bit compares current->personality without
masking the upper 16 bits. If e.g. READ_IMPLIES_EXEC is set the result
of a uname system call will always be s390x even if the process uses
the s390 personality.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Martin Schwidefsky committed Nov 14, 2008
1 parent a9cffb2 commit d2f019f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/kernel/sys_s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ asmlinkage long s390x_newuname(struct new_utsname __user *name)
{
int ret = sys_newuname(name);

if (current->personality == PER_LINUX32 && !ret) {
if (personality(current->personality) == PER_LINUX32 && !ret) {
ret = copy_to_user(name->machine, "s390\0\0\0\0", 8);
if (ret) ret = -EFAULT;
}
Expand Down

0 comments on commit d2f019f

Please sign in to comment.