Re: deferring __fput()

From: Al Viro
Date: Mon Jun 25 2012 - 02:04:08 EST


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?
--
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/