summaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/process.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2012-08-02 15:33:59 +0200
committerJames Bottomley <JBottomley@Parallels.com>2012-08-03 11:25:12 +0100
commit5b24c421621792fcc588af6f644d6acf2dd798cc (patch)
treebc89e67b20c47a8bacde1b82d087054e941aee24 /arch/parisc/kernel/process.c
parentbba3d8c3b3c0f2123be5bc687d1cddc13437c923 (diff)
downloadop-kernel-dev-5b24c421621792fcc588af6f644d6acf2dd798cc.zip
op-kernel-dev-5b24c421621792fcc588af6f644d6acf2dd798cc.tar.gz
[PARISC] fix personality flag check in copy_thread()
Directly comparing task_struct->personality against PER_* is not fully correct, as it doesn't take flags potentially stored in top three bytes into account. Analogically, directly forcefully setting personality to PER_LINUX32 or PER_LINUX discards any flags stored in the top three bytes. Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'arch/parisc/kernel/process.c')
-rw-r--r--arch/parisc/kernel/process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index d4b94b3..2c05a929 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -309,7 +309,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
cregs->ksp = (unsigned long)stack
+ (pregs->gr[21] & (THREAD_SIZE - 1));
cregs->gr[30] = usp;
- if (p->personality == PER_HPUX) {
+ if (personality(p->personality) == PER_HPUX) {
#ifdef CONFIG_HPUX
cregs->kpc = (unsigned long) &hpux_child_return;
#else
OpenPOWER on IntegriCloud