Re: [PATCH] (drivers/ethernet/atheros/atl1) test DMA mapping for error code
From: Charalampos Mitrodimas
Date: Thu Jun 12 2025 - 13:24:48 EST
Thomas Fourier <fourier.thomas@xxxxxxxxx> writes:
> According to Shuah Khan[1], all `dma_map()` functions should be tested
> before using the pointer. This patch checks for errors in `dma_map()`
> calls and in case of failure, unmaps the previously dma_mapped regions
> and returns an error.
>
> [1] https://events.static.linuxfound.org/sites/events/files/slides/Shuah_Khan_dma_map_error.pdf
>
> Signed-off-by: Thomas Fourier <fourier.thomas@xxxxxxxxx>
> ---
> drivers/net/ethernet/atheros/atlx/atl1.c | 38 ++++++++++++++++++++++--
> 1 file changed, 36 insertions(+), 2 deletions(-)
> [...]
Hi Thomas,
This doesn't seem to build. You can also see it here[1].
[1]: https://patchwork.kernel.org/project/netdevbpf/patch/20250612150542.85239-2-fourier.thomas@xxxxxxxxx/