Q: utrace_prepare_examine() && get_task_struct(target)

Oleg Nesterov oleg at redhat.com
Mon Jul 20 19:38:36 UTC 2009


I fail to understand rcu_read_lock() + get_task_struct() in
utrace_prepare_examine(). This looks as if the caller does not need to
make sure task_struct can't go away.

But, unless the caller does get_task_struct() itself (like ptrace does),
utrace_prepare_examine() can race with utrace_reap() (if the tracee is
killed) which detaches the engine but doesn't clear engine->flags ?

Oleg.




More information about the utrace-devel mailing list