[PATCH v2 0/4] dma-mapping: benchmark: fixes and error handling improvements

From: Fedor Pchelkin
Date: Sat May 04 2024 - 07:48:43 EST


Some of the error paths inside do_map_benchmark() do not behave well.
There is also an insufficient node id validation and an out-of-bounds
access in NUMA_NO_NODE case.

Adjust these issues with the following patches.

Changelog
v2:
* Rework kthread-related error handling patch (thanks to Robin Murphy) and
merge patches 1/2 and 2/2 from v1 into a single patch - 1/4 in v2.
* Three additional patches:
* * Avoid needless copy_to_user if benchmark fails (suggested by Barry Song).
* * Fix node id validation (found while testing the previous ones).
* * Handle NUMA_NO_NODE correctly.
v1:
* https://lore.kernel.org/linux-iommu/20240502161827.403338-1-pchelkin@xxxxxxxxx/

Fedor Pchelkin (4):
dma-mapping: benchmark: fix up kthread-related error handling
dma-mapping: benchmark: avoid needless copy_to_user if benchmark fails
dma-mapping: benchmark: fix node id validation
dma-mapping: benchmark: handle NUMA_NO_NODE correctly

kernel/dma/map_benchmark.c | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)

--
2.45.0