From: Oleg Nesterov Date: Wed, 16 Oct 2013 17:39:37 +0000 (+0200) Subject: uprobes: Teach uprobe_copy_process() to handle CLONE_VFORK X-Git-Tag: omap-for-v3.13/fixes-for-merge-window-take2~41^2~17^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ab679661721b1ec2aaad99a801870ed59ab1110;p=pandora-kernel.git uprobes: Teach uprobe_copy_process() to handle CLONE_VFORK uprobe_copy_process() does nothing if the child shares ->mm with the forking process, but there is a special case: CLONE_VFORK. In this case it would be more correct to do dup_utask() but avoid dup_xol(). This is not that important, the child should not unwind its stack too much, this can corrupt the parent's stack, but at least we need this to allow to ret-probe __vfork() itself. Note: in theory, it would be better to check task_pt_regs(p)->sp instead of CLONE_VFORK, we need to dup_utask() if and only if the child can return from the function called by the parent. But this needs the arch-dependant helper, and I think that nobody actually does clone(same_stack, CLONE_VM). Reported-by: Martin Cermak Reported-by: David Smith Signed-off-by: Oleg Nesterov --- Reading git-diff-tree failed