Re: [PATCH v4 3.0-rc2-tip 7/22] 7: uprobes: mmap and fork hooks.

From: Peter Zijlstra
Date: Tue Jun 21 2011 - 09:18:58 EST

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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at