Re: [PATCH] task_work: remove fifo ordering guarantee

Al Viro
2015-09-05T05:36:08Z

On Sat, Aug 29, 2015 at 02:49:21PM +0200, Oleg Nesterov wrote:

> Let's look keyctl_session_to_parent(). It does task_work_cancel()
> but only because we can not trust user-space. Otherwise we could
> remove it and just do task_work_add(), but this needs fifo.
>
> Fifo just looks more sane to me.

Not if it costs us. As far as files closing is concerned, the order
really doesn't matter. Ditto for final mntput() uses of that stuff.

What *does* matter is task_work_add() issued by callback not getting lost.

IMO the obvious solution is to lose the reordering...