Re: [PATCH 1/2] Allow a kthread to declare that it calls task_work_run()
From: Oleg Nesterov
Date: Mon Dec 04 2023 - 11:14:06 EST
I am sick and can't read emails, just one note
On 12/04, Al Viro wrote:
>
> Just have the kernel threads born with ->task_works set to &work_exited
Then irq_thread()->task_work_add() will silently fail,
> and provide a primitive that would flip it from that to NULL.
OK, so this change should update irq_thread(). But what else can fail?
And what if another kthread uses task_work_add(current) to add the
desctructor and does fput() without task_work_run() ?
Oleg.