From: Nicolas Pitre Date: Thu, 21 Aug 2008 22:22:49 +0000 (+0100) Subject: [ARM] 5221/1: fix ldm/stm emulation for kprobes X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2d4b6c9aeb94cb9cb5c250f23e81e6d00b461372;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [ARM] 5221/1: fix ldm/stm emulation for kprobes Logic for the p bit was reversed. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King --- diff --git a/arch/arm/kernel/kprobes-decode.c b/arch/arm/kernel/kprobes-decode.c index b4565bb133c1..da1f94906a4e 100644 --- a/arch/arm/kernel/kprobes-decode.c +++ b/arch/arm/kernel/kprobes-decode.c @@ -488,7 +488,7 @@ static void __kprobes simulate_ldm1stm1(struct kprobe *p, struct pt_regs *regs) if (!ubit) addr -= reg_count; - addr += (!pbit ^ !ubit); + addr += (!pbit == !ubit); reg_bit_vector = insn & 0xffff; while (reg_bit_vector) { @@ -503,7 +503,7 @@ static void __kprobes simulate_ldm1stm1(struct kprobe *p, struct pt_regs *regs) if (wbit) { if (!ubit) addr -= reg_count; - addr -= (!pbit ^ !ubit); + addr -= (!pbit == !ubit); regs->uregs[rn] = (long)addr; } }