summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2026-09-08 23:06:08 -0700
committerCarlos Maiolino <cem@kernel.org>2026-09-11 08:45:11 +0200
commitad4497a92caba4630f75c80d49cb947026213280 (patch)
treee0396fc18d6fb0a2a3a75ba149973418d1ec933f /scripts/basic
parent69e10c2b4a51b4ff3c88a70e90f5180ad58c758f (diff)
downloadlinux-ad4497a92caba4630f75c80d49cb947026213280.tar.gz
linux-ad4497a92caba4630f75c80d49cb947026213280.zip
xfs: advance the findparent inode scan cursor while holding ILOCK
LOLLM pointed out a race condition in xrep_findparent_scan -- the directory live update hook holds the directory ILOCK when it calls the xchk_iscan_want_live_update predicate to figure out if it needs to remember the live update, but xrep_findparent_scan drops the directory ILOCK before advancing the cursor. Therefore, it's possible for a live update to check the scan cursor after the scan drops the ILOCK but before the scan updates its cursor. If this happens, we'll fail to record the live update. Fix this by moving the cursor update logic inside xrep_findparent_walk_directory. Note that for non-directories it's ok to advance the cursor without holding any ILOCK because the findparent scan only cares about directory parents, not the children. Cc: stable@vger.kernel.org # v6.10 Fixes: a07b45576264e7 ("xfs: scan the filesystem to repair a directory dotdot entry") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Assisted-by: LOLLM # finding obvious bugs Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions