Re: [PATCH v2 4/9] vfs: Fix race condition on get_userns_fd()

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

On Wed, Mar 08, 2023 at 12:13:38PM +0100, Rodrigo Campos wrote:
> There is a race when we clone: we call a function that just returns
> while at the same time we try to get the userns via /proc/pid/ns/user.
> The thing is that when the function returns, in the kernel do_exit()
> from kernel/exit.c is called, which calls exit_task_namespaces() to destroy
> the namespaces.
> So, let's wait indefinitely there and add an _exit() call to avoid
> warnings. We are already sending a SIGKILL to this pid, so nothing else
> remaining to not leak the process.
> Signed-off-by: Rodrigo Campos <rodrigo@xxxxxxxxxxx>
> ---

Looks good,
Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>

[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux