]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
ARM: 6879/1: fix personality test wrt usage of domain handlers
authorNicolas Pitre <nicolas.pitre@linaro.org>
Wed, 13 Apr 2011 04:01:52 +0000 (05:01 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 14 Apr 2011 08:15:25 +0000 (09:15 +0100)
There are optional bits that may complement a personality ID.  It is
therefore wrong to simply test against the absolute current->personality
value to determine the effective personality.  The PER_LINUX_32BIT is
itself just PER_LINUX with one of those optional bits set.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/traps.c

index f0000e188c8c8c5a14be6f21c37b961739ecfad6..3b54ad19d4890c40752905af84a345b21ba56b62 100644 (file)
@@ -410,8 +410,7 @@ static int bad_syscall(int n, struct pt_regs *regs)
        struct thread_info *thread = current_thread_info();
        siginfo_t info;
 
-       if (current->personality != PER_LINUX &&
-           current->personality != PER_LINUX_32BIT &&
+       if ((current->personality & PER_MASK) != PER_LINUX &&
            thread->exec_domain->handler) {
                thread->exec_domain->handler(n, regs);
                return regs->ARM_r0;