diff options
author | Niklas Schnelle <schnelle@linux.ibm.com> | 2025-03-12 11:32:18 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2025-03-31 12:20:44 +0200 |
commit | 807c2743035446cf0484772a76e1c35ce27fd8e3 (patch) | |
tree | 889b124fd7dbaa11d7c4bc94666aeab425da2bd5 /drivers/net/wireless/intel/iwlegacy/common.c | |
parent | af6bfcd1698d822ab6a2d543b884b3eedc8c7d82 (diff) | |
download | linux-807c2743035446cf0484772a76e1c35ce27fd8e3.tar.gz linux-807c2743035446cf0484772a76e1c35ce27fd8e3.tar.bz2 linux-807c2743035446cf0484772a76e1c35ce27fd8e3.zip |
s390/pci: Fix dev.dma_range_map missing sentinel element
The fixed commit sets up dev.dma_range_map but missed that this is
supposed to be an array of struct bus_dma_region with a sentinel element
with the size field set to 0 at the end. This would lead to overruns in
e.g. dma_range_map_min(). It could also result in wrong translations
instead of DMA_MAPPING_ERROR in translate_phys_to_dma() if the paddr
were to not fit in the aperture. Fix this by using the
dma_direct_set_offset() helper which creates a sentinel for us.
Fixes: d236843a6964 ("s390/pci: store DMA offset in bus_dma_region")
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Link: https://lore.kernel.org/r/20250312-fix_dma_map_alloc-v2-1-530108d9de21@linux.ibm.com
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlegacy/common.c')
0 files changed, 0 insertions, 0 deletions