From 49f8b459fc1de5e3712b57c8ccefae9ec45270f8 Mon Sep 17 00:00:00 2001 From: Juergen Gross Date: Tue, 24 May 2022 13:46:30 +0200 Subject: xen: switch gnttab_end_foreign_access() to take a struct page pointer Instead of a virtual kernel address use a pointer of the associated struct page as second parameter of gnttab_end_foreign_access(). Most users have that pointer available already and are creating the virtual address from it, risking problems in case the memory is located in highmem. gnttab_end_foreign_access() itself won't need to get the struct page from the address again. Suggested-by: Jan Beulich Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Signed-off-by: Juergen Gross --- drivers/xen/gntdev-dmabuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/xen/gntdev-dmabuf.c') diff --git a/drivers/xen/gntdev-dmabuf.c b/drivers/xen/gntdev-dmabuf.c index 91073b4e4a20..940e5e9e8a54 100644 --- a/drivers/xen/gntdev-dmabuf.c +++ b/drivers/xen/gntdev-dmabuf.c @@ -524,7 +524,7 @@ static void dmabuf_imp_end_foreign_access(u32 *refs, int count) for (i = 0; i < count; i++) if (refs[i] != INVALID_GRANT_REF) - gnttab_end_foreign_access(refs[i], 0UL); + gnttab_end_foreign_access(refs[i], NULL); } static void dmabuf_imp_free_storage(struct gntdev_dmabuf *gntdev_dmabuf) -- cgit v1.2.3