Re: [PATCH 1/7] Freezer: Read PF_BORROWED_MM in a nonracy way

From: Oleg Nesterov
Date: Sat May 12 2007 - 10:26:13 EST


On 05/12, Rafael J. Wysocki wrote:
>
> Hmm, I'm not sure if the task can call try_to_freeze() after doing exit().
> May it happen?

It can, note the do_exit()->ptrace_notify(). But this doesn't matter, I think.
>From the freezer POV an exiting task has 2 "interesting" events

exit_mm() ->mm becomes NULL

exit_notify() ->exit_state != 0, and perhaps the task disappears
from global process list

> Or, perhaps, it's better to clear TIF_FREEZE (unconditionally) in exit_mm(),
> after we've done tsk->mm = NULL? Oleg, what do you think?

Please see another message.

Oleg.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/