]> www.infradead.org Git - users/jedix/linux-maple.git/commit
udmabuf: fix vmap_udmabuf error page set
authorHuan Yang <link@vivo.com>
Wed, 18 Sep 2024 02:52:26 +0000 (10:52 +0800)
committerVivek Kasireddy <vivek.kasireddy@intel.com>
Fri, 20 Sep 2024 21:07:32 +0000 (14:07 -0700)
commit18d7de823b7150344d242c3677e65d68c5271b04
tree89dd42c68eba8631b6bc23b436b5c610631e058a
parent1c0844c6184e658064e14c4335885785ad3bf84b
udmabuf: fix vmap_udmabuf error page set

Currently vmap_udmabuf set page's array by each folio.
But, ubuf->folios is only contain's the folio's head page.

That mean we repeatedly mapped the folio head page to the vmalloc area.

Due to udmabuf can use hugetlb, if HVO enabled, tail page may not exist,
so, we can't use page array to map, instead, use pfn array.

By this, we removed page usage in udmabuf totally.

Fixes: 5e72b2b41a21 ("udmabuf: convert udmabuf driver to use folios")
Suggested-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Huan Yang <link@vivo.com>
Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240918025238.2957823-4-link@vivo.com
drivers/dma-buf/Kconfig
drivers/dma-buf/udmabuf.c