diff options
| author | Darrick J. Wong <djwong@kernel.org> | 2026-10-12 08:22:25 -0700 |
|---|---|---|
| committer | Carlos Maiolino <cem@kernel.org> | 2026-10-14 09:34:54 +0200 |
| commit | 73b7276b8a4b5eb272f3c3b36ea3042e786f4741 (patch) | |
| tree | 3df38931a14698a8699cbaff8c9e93b04142451d /tools/perf/scripts/python/stackcollapse.py | |
| parent | ce9098338a7e1a77246684242d10779fc4d4a539 (diff) | |
| download | linux-73b7276b8a4b5eb272f3c3b36ea3042e786f4741.tar.gz linux-73b7276b8a4b5eb272f3c3b36ea3042e786f4741.zip | |
xfs: range-check bc_levels array access in scrub tracepoints
LOLLM noticed xchk_btree()'s odd habit of passing cur->bc_nlevels to
xchk_btree_ptr_ok when we're checking the pointer to the root block at
the start of the btree scan. This enables us to skip checking the
pointer for an inode btree's root (since it doesn't have one) but
doesn't handle per-AG btrees quite correctly. There isn't a problem for
__xfs_btree_check_ptr itself, but the corruption tracepoint naively
walks off the end of bc_level[]. Fix that by adding a helper to do an
implicit range check.
Cc: stable@vger.kernel.org # v5.16
Fixes: 6ca444cfd66354 ("xfs: prepare xfs_btree_cur for dynamic cursor heights")
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/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
