summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorShakeel Butt <shakeel.butt@linux.dev>2026-08-20 22:05:06 -0700
committerChristian Brauner <brauner@kernel.org>2026-08-31 10:04:58 +0200
commit4c291d7d3dbd449ead467219b00f1a669358da38 (patch)
treebaf0933cda8a265a6682ced642339acc3c2f84d4 /tools/lib/python
parentea1c84cca6ab94c7680a68a2560fcf992f3728ba (diff)
downloadlinux-next-4c291d7d3dbd449ead467219b00f1a669358da38.tar.gz
linux-next-4c291d7d3dbd449ead467219b00f1a669358da38.zip
kernfs: Avoid namespace dereference in d_revalidate()
Commit 1fe989e1c42a ("kernfs: use namespace id instead of pointer for hashing and comparison") changed dentry revalidation to compare namespace IDs along with the comparisons that determine visible directory ordering. Dereferencing a namespace tag that kernfs_rename_ns() can replace is not suitable once dentry revalidation stops taking kernfs_rwsem. Use pointer equality for this non-user-visible equality check instead. Namespace IDs uniquely identify namespace objects, so pointer and ID equality cannot disagree for valid tags. Hashing and directory ordering continue to use IDs. kn->ns becomes a lockless read in the next commit, so mark both sides of it now. The read is in kernfs_dop_revalidate(); the stores that can run while the node is visible are the two in kernfs_rename_ns(). The remaining stores, in kernfs_create_dir_ns(), kernfs_create_empty_dir() and kernfs_create_link(), all precede kernfs_add_one() and need no marking. Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev> Link: https://patch.msgid.link/20260821050507.2161607-4-shakeel.butt@linux.dev Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions