From: Nicolas Pitre Date: Wed, 13 Apr 2011 04:01:52 +0000 (+0100) Subject: ARM: 6879/1: fix personality test wrt usage of domain handlers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=88b9ef452690233d200abf57a3fa2c0f3bd874c5;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ARM: 6879/1: fix personality test wrt usage of domain handlers 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 Signed-off-by: Russell King --- diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index f0000e188c8c..3b54ad19d489 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -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;