Re: [PATCH v2] fs: consistently deref the files table with rcu_dereference_raw()
From: Christian Brauner
Date: Fri Mar 14 2025 - 11:40:23 EST
On Thu, 13 Mar 2025 14:57:25 +0100, Mateusz Guzik wrote:
> ... except when the table is known to be only used by one thread.
>
> A file pointer can get installed at any moment despite the ->file_lock
> being held since the following:
> 8a81252b774b53e6 ("fs/file.c: don't acquire files->file_lock in fd_install()")
>
> Accesses subject to such a race can in principle suffer load tearing.
>
> [...]
Applied to the vfs-6.15.misc branch of the vfs/vfs.git tree.
Patches in the vfs-6.15.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-6.15.misc
[1/1] fs: consistently deref the files table with rcu_dereference_raw()
https://git.kernel.org/vfs/vfs/c/c72b20d10034