mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 12:21:22 -05:00
udmabuf: fix vmap missed offset page
Before invoke vmap, we need offer a pages pointer array which each page
need to map in vmalloc area.
But currently vmap_udmabuf only set each folio's head page into pages,
missed each offset pages when iter.
This patch set the correctly offset page in each folio into array.
Signed-off-by: Huan Yang <link@vivo.com>
Fixes: 5e72b2b41a ("udmabuf: convert udmabuf driver to use folios")
Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Link: https://lore.kernel.org/r/20250428073831.19942-3-link@vivo.com
This commit is contained in:
committed by
Vivek Kasireddy
parent
ceb7b62eaa
commit
a26fd92b72
@@ -120,7 +120,8 @@ static int vmap_udmabuf(struct dma_buf *buf, struct iosys_map *map)
|
||||
return -ENOMEM;
|
||||
|
||||
for (pg = 0; pg < ubuf->pagecount; pg++)
|
||||
pages[pg] = &ubuf->folios[pg]->page;
|
||||
pages[pg] = folio_page(ubuf->folios[pg],
|
||||
ubuf->offsets[pg] >> PAGE_SHIFT);
|
||||
|
||||
vaddr = vm_map_ram(pages, ubuf->pagecount, -1);
|
||||
kvfree(pages);
|
||||
|
||||
Reference in New Issue
Block a user