Messages in this thread | | | Date | Wed, 9 Aug 2023 19:05:04 +0200 | Subject | Re: [PATCH] arm: dma-mapping: fix potential endless loop in __dma_page_dev_to_cpu() | From | Marek Szyprowski <> |
| |
Hi,
On 07.08.2023 18:23, Matthew Wilcox wrote: > On Mon, Aug 07, 2023 at 05:26:57PM +0200, Marek Szyprowski wrote: >> It is possible that the folio_size() of the next folio returns zero, so > What? How can folio_size() return zero? > > return PAGE_SIZE << folio_order(folio); > > It is a minimum of PAGE_SIZE.
Well, the folio_order() on that next folio returns 255, so folio_size() overflows to zero. However, the main source of this issue is relying on the properties of the folio beyond the requested sync region.
> ...
Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland
| |