aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorKeith Busch <[email protected]>2022-12-19 10:59:06 -0800
committerChristoph Hellwig <[email protected]>2022-12-21 09:17:25 +0100
commitc89a529e823d51dd23c7ec0c047c7a454a428541 (patch)
treefa60419843f42cb3f3b7be7089a05c5c33240ad9 /tools/perf/scripts/python/stackcollapse.py
parentb5f96cb719d8ba220b565ddd3ba4ac0d8bcfb130 (diff)
nvme-pci: fix mempool alloc size
Convert the max size to bytes to match the units of the divisor that calculates the worst-case number of PRP entries. The result is used to determine how many PRP Lists are required. The code was previously rounding this to 1 list, but we can require 2 in the worst case. In that scenario, the driver would corrupt memory beyond the size provided by the mempool. While unlikely to occur (you'd need a 4MB in exactly 127 phys segments on a queue that doesn't support SGLs), this memory corruption has been observed by kfence. Cc: Jens Axboe <[email protected]> Fixes: 943e942e6266f ("nvme-pci: limit max IO size and segments to avoid high order allocations") Signed-off-by: Keith Busch <[email protected]> Reviewed-by: Jens Axboe <[email protected]> Reviewed-by: Kanchan Joshi <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions