Skip to content

Commit

Permalink
ARM: 6879/1: fix personality test wrt usage of domain handlers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Pitre authored and Russell King committed Apr 14, 2011
1 parent 5e14343 commit 88b9ef4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/arm/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 88b9ef4

Please sign in to comment.