Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350095
b: refs/heads/master
c: 608e742
h: refs/heads/master
i:
  350093: 5dc0139
  350091: 5a686c8
  350087: fdc4f80
  350079: d406930
v: v3
  • Loading branch information
Oleg Nesterov committed Feb 8, 2013
1 parent 409f5ed commit c9ec5bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aba51024e7159c93914557caaa2b8cda26331091
refs/heads/master: 608e7427c0a06de0d70374a9fd7defc8eb228b7e
16 changes: 6 additions & 10 deletions trunk/kernel/events/uprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,9 @@ pre_ssout(struct uprobe *uprobe, struct pt_regs *regs, unsigned long bp_vaddr)
unsigned long xol_vaddr;
int err;

utask = current->utask;
utask = get_utask();
if (!utask)
return -ENOMEM;

xol_vaddr = xol_get_insn_slot(uprobe);
if (!xol_vaddr)
Expand All @@ -1323,6 +1325,8 @@ pre_ssout(struct uprobe *uprobe, struct pt_regs *regs, unsigned long bp_vaddr)
return err;
}

utask->active_uprobe = uprobe;
utask->state = UTASK_SSTEP;
return 0;
}

Expand Down Expand Up @@ -1474,7 +1478,6 @@ static void handler_chain(struct uprobe *uprobe, struct pt_regs *regs)
*/
static void handle_swbp(struct pt_regs *regs)
{
struct uprobe_task *utask;
struct uprobe *uprobe;
unsigned long bp_vaddr;
int uninitialized_var(is_swbp);
Expand Down Expand Up @@ -1512,19 +1515,12 @@ static void handle_swbp(struct pt_regs *regs)
if (unlikely(!test_bit(UPROBE_COPY_INSN, &uprobe->flags)))
goto out;

utask = get_utask();
if (!utask)
goto out; /* re-execute the instruction. */

handler_chain(uprobe, regs);
if (can_skip_sstep(uprobe, regs))
goto out;

if (!pre_ssout(uprobe, regs, bp_vaddr)) {
utask->active_uprobe = uprobe;
utask->state = UTASK_SSTEP;
if (!pre_ssout(uprobe, regs, bp_vaddr))
return;
}

/* can_skip_sstep() succeeded, or restart if can't singlestep */
out:
Expand Down

0 comments on commit c9ec5bf

Please sign in to comment.