Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334766
b: refs/heads/master
c: 142b18d
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov committed Oct 7, 2012
1 parent cce6ca9 commit fe7b564
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 076a365b3da99b68c5d58e394714d0611f1fa002
refs/heads/master: 142b18ddc81439acda4bc4231b291e99fe67d507
9 changes: 9 additions & 0 deletions trunk/kernel/events/uprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ install_breakpoint(struct uprobe *uprobe, struct mm_struct *mm,
BUG_ON((uprobe->offset & ~PAGE_MASK) +
UPROBE_SWBP_INSN_SIZE > PAGE_SIZE);

smp_wmb(); /* pairs with rmb() in find_active_uprobe() */
uprobe->flags |= UPROBE_COPY_INSN;
}

Expand Down Expand Up @@ -1436,6 +1437,14 @@ static void handle_swbp(struct pt_regs *regs)
}
return;
}
/*
* TODO: move copy_insn/etc into _register and remove this hack.
* After we hit the bp, _unregister + _register can install the
* new and not-yet-analyzed uprobe at the same address, restart.
*/
smp_rmb(); /* pairs with wmb() in install_breakpoint() */
if (unlikely(!(uprobe->flags & UPROBE_COPY_INSN)))
goto restart;

utask = current->utask;
if (!utask) {
Expand Down

0 comments on commit fe7b564

Please sign in to comment.