summaryrefslogtreecommitdiff
path: root/tools/perf/tests/shell/test_stackcollapse_python.sh
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2026-09-14 22:38:38 -0700
committerCarlos Maiolino <cem@kernel.org>2026-09-17 11:27:41 +0200
commit65f39d09d73718611cee40399179323b5d4ead00 (patch)
treee43882d52d9737f384ae8a5073c9f57858eb80ce /tools/perf/tests/shell/test_stackcollapse_python.sh
parentf8f6382ff13109e19d0fc1d0224ff7d29641e56a (diff)
downloadlinux-next-65f39d09d73718611cee40399179323b5d4ead00.tar.gz
linux-next-65f39d09d73718611cee40399179323b5d4ead00.zip
xfs: fix cursor and pointer handling when recovering iunlink buckets
LOLLM pointed out a bug in xlog_recover_iunlink_bucket: 1. We don't null out prev_ip after releasing it, which can lead to UAF problems if the inodegc flush call in the loop fails. at which point I noticed even more bugs: 2. If the inodegc flush inside the loop fails, we also leak @ip. 3. We set prev_agino to agino having already advanced agino, which results in inodes with i_prev_unlinked set to itself. 4. If we exit the bottom of the loop with prev_ip set, then prev_ip aliases ip and we also set its i_prev_unlinked to itself. Bugs 3 and 4 introduce loops into the unlinked list, though these loops don't surface because we immediately flush each unlinked inode after loading it. Fix all of these issues. Cc: stable@vger.kernel.org # v6.0 Fixes: 04755d2e5821b3 ("xfs: refactor xlog_recover_process_iunlinks()") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Assisted-by: LOLLM # finding obvious bugs Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'tools/perf/tests/shell/test_stackcollapse_python.sh')
0 files changed, 0 insertions, 0 deletions