Messages in this thread | | | Date | Sun, 24 Jun 2012 17:33:10 +0200 | From | Oleg Nesterov <> | Subject | Re: deferring __fput() |
| |
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.
| |