aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2008-08-21 18:22:49 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-09-01 07:06:33 -0400
commit2d4b6c9aeb94cb9cb5c250f23e81e6d00b461372 (patch)
tree5ed34ac92f126090e1f54e6112d590ce98ea41a4
parentd81030a1badb4e4d08358ff2c2bda9b11d5a6559 (diff)
[ARM] 5221/1: fix ldm/stm emulation for kprobes
Logic for the p bit was reversed. Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/kernel/kprobes-decode.c4
1 files changed, 2 insertions, 2 deletions
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)
488 488
489 if (!ubit) 489 if (!ubit)
490 addr -= reg_count; 490 addr -= reg_count;
491 addr += (!pbit ^ !ubit); 491 addr += (!pbit == !ubit);
492 492
493 reg_bit_vector = insn & 0xffff; 493 reg_bit_vector = insn & 0xffff;
494 while (reg_bit_vector) { 494 while (reg_bit_vector) {
@@ -503,7 +503,7 @@ static void __kprobes simulate_ldm1stm1(struct kprobe *p, struct pt_regs *regs)
503 if (wbit) { 503 if (wbit) {
504 if (!ubit) 504 if (!ubit)
505 addr -= reg_count; 505 addr -= reg_count;
506 addr -= (!pbit ^ !ubit); 506 addr -= (!pbit == !ubit);
507 regs->uregs[rn] = (long)addr; 507 regs->uregs[rn] = (long)addr;
508 } 508 }
509} 509}