remarkable-linux/kernel/events
Oleg Nesterov 248d3a7b2f 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 <mcermak@redhat.com>
Reported-by: David Smith <dsmith@redhat.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
2013-10-29 18:02:53 +01:00
..
callchain.c perf: Roll back callchain buffer refcount under the callchain mutex 2013-08-16 17:55:50 +02:00
core.c perf: Fix the perf context switch optimization 2013-10-29 14:13:01 +01:00
hw_breakpoint.c hw_breakpoint: Introduce "struct bp_cpuinfo" 2013-06-20 17:58:57 +02:00
internal.h perf: Fix mmap() accounting hole 2013-06-19 12:44:13 +02:00
Makefile uprobes: Move to kernel/events/ 2012-02-22 11:08:00 +01:00
ring_buffer.c perf: Fix vmalloc ring buffer pages handling 2013-05-01 12:34:46 +02:00
uprobes.c uprobes: Change uprobe_copy_process() to dup return_instances 2013-10-29 18:02:53 +01:00