summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2026-06-12 15:54:31 +0100
committerDavid Sterba <dsterba@suse.com>2026-08-07 19:16:27 +0200
commit0a9c35d3040d5aa6bb449b2f1e206cc0ac094343 (patch)
tree3797d8388e91e80d9068c2de9a4af60e1e8f9840 /tools/perf/scripts/python/bin/stackcollapse-report
parent6f1c97695a6e230ee15c9e052e1933bdccfd5fa3 (diff)
btrfs: fix copy_remapped_data() to not allocate more memory than intended
The loop intends to copy the data in chunks up to 1M but we allocate the pages array for the entire length and don't cap it to 1M. Fix this by computing 'nr_pages' using 'copy_len' instead of 'length'. While at it, also make 'nr_pages' and 'copy_len' const, as they never change, to make the code more clear. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions