aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/sys_s390.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/sys_s390.c')
-rw-r--r--arch/s390/kernel/sys_s390.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c
index b4a29eee41b8..d0964d22adb5 100644
--- a/arch/s390/kernel/sys_s390.c
+++ b/arch/s390/kernel/sys_s390.c
@@ -81,11 +81,12 @@ SYSCALL_DEFINE1(s390_personality, unsigned int, personality)
81{ 81{
82 unsigned int ret; 82 unsigned int ret;
83 83
84 if (current->personality == PER_LINUX32 && personality == PER_LINUX) 84 if (personality(current->personality) == PER_LINUX32 &&
85 personality = PER_LINUX32; 85 personality(personality) == PER_LINUX)
86 personality |= PER_LINUX32;
86 ret = sys_personality(personality); 87 ret = sys_personality(personality);
87 if (ret == PER_LINUX32) 88 if (personality(ret) == PER_LINUX32)
88 ret = PER_LINUX; 89 ret &= ~PER_LINUX32;
89 90
90 return ret; 91 return ret;
91} 92}