summaryrefslogtreecommitdiff
path: root/kernel/debug/debug_core.c
diff options
context:
space:
mode:
authororkunsari <sariorkunemin@gmail.com>2026-11-04 14:56:15 +0300
committerChuck Lever <cel@kernel.org>2026-11-19 11:14:13 -0500
commit1ecc5b7c95ae585042ccbf3c587897dd99e2ddb5 (patch)
tree6327d71d079ffa9ef41ce3a44b1abffa063a7075 /kernel/debug/debug_core.c
parenteafb6de800781f0a1be5cdd98d150620041d8b27 (diff)
nfsd: unlock the locked parent after crossing a mount in CREATE
Since commit f58a48389c14 ("nfsd: correctly handle CREATE of mounted-on files"), nfsd_proc_create() and nfsd3_create_file() call nfsd_cross_mnt() on the dentry returned by start_creating(). When the name refers to a file that has something mounted on it, nfsd_cross_mnt() replaces that dentry with the root of the mounted filesystem and drops its reference to the original one. The replacement is later passed to end_creating(), which unlocks the d_parent of the dentry it is given. That is the parent of the mount source, not the directory start_creating() locked, so the directory being created in is left locked and another directory's i_rwsem is released without being held. Do the crossing on a separate reference that is only used for fh_compose(), so that the dentry returned by start_creating() is the one passed to end_creating(). Only positive regular files are crossed, so the later checks on the child dentry give the same result. This was found by AI-assisted code review (Claude Code). The fix has been build-tested with W=1 only; no reproducer was run. Fixes: f58a48389c14 ("nfsd: correctly handle CREATE of mounted-on files") Signed-off-by: orkunsari <sariorkunemin@gmail.com> Link: https://patch.msgid.link/20261104-nfsd-cross-mnt-v1-1-5ec5fca0a553@gmail.com Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'kernel/debug/debug_core.c')
0 files changed, 0 insertions, 0 deletions