summaryrefslogtreecommitdiff
path: root/uprobe
diff options
context:
space:
mode:
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>2013-04-02 17:07:39 +0400
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>2013-04-02 17:07:39 +0400
commit967a54f56e30edc45256866c21b8fcf7c1cb8590 (patch)
tree501737d192083f41e328c518be10b060648f16f4 /uprobe
parent14eef18ad1a0953c73c5e6ca32ffa8bf5ee7a814 (diff)
downloadswap-modules-967a54f56e30edc45256866c21b8fcf7c1cb8590.tar.gz
swap-modules-967a54f56e30edc45256866c21b8fcf7c1cb8590.tar.bz2
swap-modules-967a54f56e30edc45256866c21b8fcf7c1cb8590.zip
[REFACTOR] redesign uprobe_handler()
Diffstat (limited to 'uprobe')
-rw-r--r--uprobe/arch/asm-arm/swap_uprobes.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/uprobe/arch/asm-arm/swap_uprobes.c b/uprobe/arch/asm-arm/swap_uprobes.c
index 08b47741..eb4a5f60 100644
--- a/uprobe/arch/asm-arm/swap_uprobes.c
+++ b/uprobe/arch/asm-arm/swap_uprobes.c
@@ -714,18 +714,14 @@ static int uprobe_handler(struct pt_regs *regs)
}
trampoline_uprobe_handler(p, regs);
- return 0;
- }
-
- if (p && (check_validity_insn(p, regs) != 0)) {
+ } else if (check_validity_insn(p, regs) != 0) {
printk("no_uprobe live\n");
- return 0;
- }
-
- restore_opcode_for_thumb(p, regs);
+ } else {
+ restore_opcode_for_thumb(p, regs);
- if (!p->pre_handler || !p->pre_handler(p, regs)) {
- prepare_singlestep(p, regs);
+ if (!p->pre_handler || !p->pre_handler(p, regs)) {
+ prepare_singlestep(p, regs);
+ }
}
return 0;