summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2012-08-07 18:12:30 +0200
committerAnton Arapov <anton@redhat.com>2012-10-29 11:42:33 +0100
commitf79e740992781b37983c6b56e9421d05e0425b36 (patch)
treead1839e31366e23f1add1caa2db37f3ece4994fa
parent8d2285b75ed9bea84f9eae2cffa612b3a96f366a (diff)
downloadkernel-uprobes-f79e740992781b37983c6b56e9421d05e0425b36.zip
kernel-uprobes-f79e740992781b37983c6b56e9421d05e0425b36.tar.gz
kernel-uprobes-f79e740992781b37983c6b56e9421d05e0425b36.tar.xz
uprobes: Remove check for uprobe variable in handle_swbp()
by the time we get here (after we pass cleanup_ret) uprobe is always is set. If it is NULL we leave very early in the code. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
-rw-r--r--kernel/events/uprobes.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 7cff24c..0cefde2 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1516,17 +1516,15 @@ cleanup_ret:
utask->active_uprobe = NULL;
utask->state = UTASK_RUNNING;
}
- if (uprobe) {
- if (!(uprobe->flags & UPROBE_SKIP_SSTEP))
+ if (!(uprobe->flags & UPROBE_SKIP_SSTEP))
- /*
- * cannot singlestep; cannot skip instruction;
- * re-execute the instruction.
- */
- instruction_pointer_set(regs, bp_vaddr);
+ /*
+ * cannot singlestep; cannot skip instruction;
+ * re-execute the instruction.
+ */
+ instruction_pointer_set(regs, bp_vaddr);
- put_uprobe(uprobe);
- }
+ put_uprobe(uprobe);
}
/*