uprobes: Change uprobe_copy_process() to dup return_instances
uprobes: Change uprobe_copy_process() to dup return_instances

uprobe_copy_process() assumes that the new child doesn't need
->utask, it should be allocated by demand.

But this is not true if the forking task has the pending ret-
probes, the child should report them as well and thus it needs
the copy of parent's ->return_instances chain. Otherwise the
child crashes when it returns from the probed function.

Alternatively we could cleanup the child's stack, but this needs
per-arch changes and this is not what we want. At least systemtap
expects a .return in the child too.

Note: this change alone doesn't fix the problem, see the next
change.

Reported-by: Martin Cermak <5fe615665ec40251ad31eb83c98c7cb2e2f69450@redhat.com>
Reported-by: David Smith <943534bf6a2b742d47789a3e75a955a7cc54c69f@redhat.com>
Signed-off-by: Oleg Nesterov <20b70f0af00562e63758b9ee42012ecc96c58590@redhat.com>
Acked-by: Srikar Dronamraju <1f69195f6d934d4caf5816234bde319316df237e@linux.vnet.ibm.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs