ce7612496a
commit 53c87e846e335e3c18044c397cc35178163d7827 upstream.
Limit the free list length to the size of the IO TLB. Transient pool can be
smaller than IO_TLB_SEGSIZE, but the free list is initialized with the
assumption that the total number of slots is a multiple of IO_TLB_SEGSIZE.
As a result, swiotlb_area_find_slots() may allocate slots past the end of
a transient IO TLB buffer.
Reported-by: Niklas Schnelle <schnelle@linux.ibm.com>
Closes: https://lore.kernel.org/linux-iommu/104a8c8fedffd1ff8a2890983e2ec1c26bff6810.camel@linux.ibm.com/
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
coherent.c | ||
contiguous.c | ||
debug.c | ||
debug.h | ||
direct.c | ||
direct.h | ||
dummy.c | ||
map_benchmark.c | ||
mapping.c | ||
ops_helpers.c | ||
pool.c | ||
remap.c | ||
swiotlb.c |