Messages in this thread | | | Subject | Re: [PATCH v4 3.0-rc2-tip 7/22] 7: uprobes: mmap and fork hooks. | From | Peter Zijlstra <> | Date | Tue, 21 Jun 2011 15:17:23 +0200 |
| |
On Fri, 2011-06-17 at 11:41 +0200, Peter Zijlstra wrote: > > On thing I was thinking of to fix that initial problem of spurious traps > was to leave the uprobe in the tree but skip all probes without > consumers in mmap_uprobe().
Can you find fault with using __unregister_uprobe() as a cleanup path for __register_uprobe() so that we do a second vma-rmap walk, and ignoring empty probes on uprobe_mmap()?
We won't get spurious traps because the empty (no consumers) uprobe is still in the tree, we won't get any 'lost' probe insn because the cleanup does a second vma-rmap walk which will include the new mmap(). And double probe insertion is harmless.
| |