Messages in this thread | | | Date | Mon, 25 Jun 2012 07:03:57 +0100 | From | Al Viro <> | Subject | Re: deferring __fput() |
| |
On Sun, Jun 24, 2012 at 05:33:10PM +0200, Oleg Nesterov wrote: > 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().
Hrm... I still think that callers can bloody well check it themselves, but anyway - we can add a new PF_... bit and have it set on kernel threads (all along) and during exit_task_work(); the real question is in locking and barriers needed there. Suggestions?
| |