summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2022-12-19 21:59:06 +0300
committerChristoph Hellwig <hch@lst.de>2022-12-21 11:17:25 +0300
commitc89a529e823d51dd23c7ec0c047c7a454a428541 (patch)
treefa60419843f42cb3f3b7be7089a05c5c33240ad9 /tools/perf/scripts/python/syscall-counts.py
parentb5f96cb719d8ba220b565ddd3ba4ac0d8bcfb130 (diff)
downloadlinux-c89a529e823d51dd23c7ec0c047c7a454a428541.tar.xz
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 <axboe@kernel.dk> Fixes: 943e942e6266f ("nvme-pci: limit max IO size and segments to avoid high order allocations") Signed-off-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Reviewed-by: Kanchan Joshi <joshi.k@samsung.com> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions