diff options
| author | Mikhail Kobuk <[email protected]> | 2024-03-28 02:32:23 +0300 |
|---|---|---|
| committer | Hans Verkuil <[email protected]> | 2024-05-31 13:51:15 +0200 |
| commit | 629913d6d79508b166c66e07e4857e20233d85a9 (patch) | |
| tree | 88b2287c01558b7e65e5dae5c78711000529e7b8 /tools/perf/scripts/python/netdev-times.py | |
| parent | dd40472dc6d7078746680e71ed2f4cc9c4e15b0a (diff) | |
media: pci: ivtv: Add check for DMA map result
In case DMA fails, 'dma->SG_length' is 0. This value is later used to
access 'dma->SGarray[dma->SG_length - 1]', which will cause out of
bounds access.
Add check to return early on invalid value. Adjust warnings accordingly.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 1932dc2f4cf6 ("media: pci/ivtv: switch from 'pci_' to 'dma_' API")
Signed-off-by: Mikhail Kobuk <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions