Re: deferring __fput()

From: Oleg Nesterov
Date: Sun Jun 24 2012 - 11:35:14 EST


On 06/24, Al Viro wrote:
>
> BTW, I suspect that we really want to move exit_task_work() down past the
> calls of exit_mm()/exit_files()

Yes, probably. But I do not know how far we should move it.

> (and lose the PF_EXITING check in
> task_work_add(), making that ordering responsibility of callers).

No, we can't do this?

OK, perhaps we can check something else instead of PF_EXITING.
But somehow we should ensuree that if task_work_add(twork) succeeds,
then twork->func() will be called. IOW, if task_work_add() races with
the exiting task, it should not succeed after exit_task_work().

> I'm not 100% sure about that one - if you have planned task_work users
> relying on e.g. task->mm still being there when callback runs,

No, I didn't.

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/