Skip to content

Commit

Permalink
uprobes: Remove check for uprobe variable in handle_swbp()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Andrzej Siewior authored and Oleg Nesterov committed Aug 28, 2012
1 parent 61e1d39 commit 8bd8744
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions kernel/events/uprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1516,17 +1516,15 @@ static void handle_swbp(struct pt_regs *regs)
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);
}

/*
Expand Down

0 comments on commit 8bd8744

Please sign in to comment.