diff options
| author | Thomas Fourier <fourier.thomas@gmail.com> | 2026-01-14 13:31:06 +0100 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-01-17 15:40:06 -0800 |
| commit | d998b0e5afffa90d0f03770bad31083767079858 (patch) | |
| tree | 288545b0fd94e26b21fe4b7add000fb7a108c858 /kernel/debug | |
| parent | a80c9d945aef55b23b54838334345f20251dad83 (diff) | |
octeontx2: Fix otx2_dma_map_page() error return code
0 is a valid DMA address [1] so using it as the error value can lead to
errors. The error value of dma_map_XXX() functions is DMA_MAPPING_ERROR
which is ~0. The callers of otx2_dma_map_page() use dma_mapping_error()
to test the return value of otx2_dma_map_page(). This means that they
would not detect an error in otx2_dma_map_page().
Make otx2_dma_map_page() return the raw value of dma_map_page_attrs().
[1] https://lore.kernel.org/all/f977f68b-cec5-4ab7-b4bd-2cf6aca46267@intel.com
Fixes: caa2da34fd25 ("octeontx2-pf: Initialize and config queues")
Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Link: https://patch.msgid.link/20260114123107.42387-2-fourier.thomas@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'kernel/debug')
0 files changed, 0 insertions, 0 deletions
