Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88b9ef45 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Russell King
Browse files

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: default avatarNicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 5e143436
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -410,8 +410,7 @@ static int bad_syscall(int n, struct pt_regs *regs)
	struct thread_info *thread = current_thread_info();
	struct thread_info *thread = current_thread_info();
	siginfo_t info;
	siginfo_t info;


	if (current->personality != PER_LINUX &&
	if ((current->personality & PER_MASK) != PER_LINUX &&
	    current->personality != PER_LINUX_32BIT &&
	    thread->exec_domain->handler) {
	    thread->exec_domain->handler) {
		thread->exec_domain->handler(n, regs);
		thread->exec_domain->handler(n, regs);
		return regs->ARM_r0;
		return regs->ARM_r0;