summaryrefslogtreecommitdiff
path: root/drivers/xen/gntdev-dmabuf.c
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2022-05-24 14:46:30 +0300
committerJuergen Gross <jgross@suse.com>2022-05-27 12:05:29 +0300
commit49f8b459fc1de5e3712b57c8ccefae9ec45270f8 (patch)
treea94aa459860a3d82cae0933e922e1cbfaa980766 /drivers/xen/gntdev-dmabuf.c
parent5b3353949e89d48b4faf54a9cc241ee5d70df615 (diff)
downloadlinux-49f8b459fc1de5e3712b57c8ccefae9ec45270f8.tar.xz
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 <jbeulich@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/xen/gntdev-dmabuf.c')
-rw-r--r--drivers/xen/gntdev-dmabuf.c2
1 files changed, 1 insertions, 1 deletions
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)