opnsense-src/sys/compat/linuxkpi/common/include
Austin Shafer 4085bde9fa linuxkpi: Fix return value of dma_map_sgtable
dma_map_sgtable internally uses the dma_map_sg_attrs helper. The problem is
that dma_map_sg_attrs returns the number of entries mapped, whereas
dma_map_sgtable returns nonzero on failure. This leads to dma_map_sgtable
returning non-zero-but-positive values which tricks other areas of the stack
into thinking nents is a valid pointer.

This checks if nents is valid and returns zero if so, updating the nents field
in sgt. This fixes PRIME render offload with nvidia-drm.

Fixes:	9202c95f47 ("linuxkpi: Add dma_{un,}map_sgtable")
2022-12-06 16:25:53 +01:00
..
acpi linuxkpi: Add <acpi/actbl.h> 2022-11-11 18:38:06 +01:00
asm linuxkpi: Add cmpxchg64() in <asm/atomic.h> 2022-12-01 14:59:16 +01:00
asm-generic linuxkpi: Add io.h 2022-08-08 15:22:35 +02:00
linux linuxkpi: Fix return value of dma_map_sgtable 2022-12-06 16:25:53 +01:00
net LinuxKPI: 802.11: minor header updates 2022-11-28 21:21:06 +00:00
video linuxkpi: Add video/mipi_display.h 2022-08-18 09:47:12 +02:00
stdarg.h LinuxKPI: Add stdarg.h proxy header 2022-01-10 22:49:37 +03:00