]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
uprobes: Remove check for uprobe variable in handle_swbp()
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 7 Aug 2012 16:12:30 +0000 (18:12 +0200)
committerOleg Nesterov <oleg@redhat.com>
Tue, 28 Aug 2012 16:21:16 +0000 (18:21 +0200)
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>
kernel/events/uprobes.c

index 7cff24c60dd7107a335ed8db637dafb154c66d18..0cefde276641783f66f470f8d4dac04d87cfcf81 100644 (file)
@@ -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);
 }
 
 /*