Browse Source

[S390] fix s390x_newuname

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>
Martin Schwidefsky 16 years ago
parent
commit
d2f019fe40
1 changed files with 1 additions and 1 deletions
  1. 1 1
      arch/s390/kernel/sys_s390.c

+ 1 - 1
arch/s390/kernel/sys_s390.c

@@ -198,7 +198,7 @@ asmlinkage long s390x_newuname(struct new_utsname __user *name)
 {
 {
 	int ret = sys_newuname(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);
 		ret = copy_to_user(name->machine, "s390\0\0\0\0", 8);
 		if (ret) ret = -EFAULT;
 		if (ret) ret = -EFAULT;
 	}
 	}