Re: [PATCH] acct: Prevent NULL pointer dereference when writing to sysfs

From: Al Viro
Date: Mon Feb 10 2025 - 10:22:02 EST


On Mon, Feb 10, 2025 at 04:12:54PM +0100, Christian Brauner wrote:

> One fix would be to move exit_fs() past exit_task_work(). It looks like
> that this should be doable without much of a problem and it would fix
> the path_init() problem.
>
> There should hopefully be nothing relying on task->fs == NULL in
> exit_task_work().

There's a question of the task_work_add() issued by exit_task_fs(),
though.