Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312213
b: refs/heads/master
c: 56bb4cf
h: refs/heads/master
i:
  312211: 70faade
v: v3
  • Loading branch information
Oleg Nesterov authored and Ingo Molnar committed Jun 6, 2012
1 parent f67666e commit 2ac656c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 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: 77fc4af1b59d12ab3b1467adf0a5204806853123
refs/heads/master: 56bb4cf6475d702d2fb00fc641aa6441097c0330
18 changes: 15 additions & 3 deletions trunk/kernel/events/uprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1530,14 +1530,26 @@ static void handle_swbp(struct pt_regs *regs)
struct uprobe_task *utask;
struct uprobe *uprobe;
unsigned long bp_vaddr;
int is_swbp;
int uninitialized_var(is_swbp);

bp_vaddr = uprobe_get_swbp_addr(regs);
uprobe = find_active_uprobe(bp_vaddr, &is_swbp);

if (!uprobe) {
/* No matching uprobe; signal SIGTRAP. */
send_sig(SIGTRAP, current, 0);
if (is_swbp > 0) {
/* No matching uprobe; signal SIGTRAP. */
send_sig(SIGTRAP, current, 0);
} else {
/*
* Either we raced with uprobe_unregister() or we can't
* access this memory. The latter is only possible if
* another thread plays with our ->mm. In both cases
* we can simply restart. If this vma was unmapped we
* can pretend this insn was not executed yet and get
* the (correct) SIGSEGV after restart.
*/
instruction_pointer_set(regs, bp_vaddr);
}
return;
}

Expand Down

0 comments on commit 2ac656c

Please sign in to comment.