Skip to contentSkip to conversation

fork() && ftrace_graph_exit_task()

DISCUSSION Oleg Nesterov 2 participants 2 messages May 21, 2009 – May 24, 2009

lore
Share & tools
lore
#0 lore raw

What if the task with ->ret_stack != NULL calls fork(), and copy_prcoess() fails after successfull dup_task_struct() ?

bad_fork_free: -> free_task()->ftrace_graph_exit_task() will free the parent's ->ret_stack copied by arch_dup_task_struct(), no?

Oleg.

#1 lore raw
Quoted 9 lines · Oleg Nesterov

What if the task with ->ret_stack != NULL calls fork(), and copy_prcoess() fails after successfull dup_task_struct() ?

bad_fork_free: -> free_task()->ftrace_graph_exit_task() will free the parent's ->ret_stack copied by arch_dup_task_struct(), no?

Oleg.

Good catch, that's a rare situation but very dangerous.

I will fix it, thanks for your report!

Frederic.