summaryrefslogtreecommitdiff
path: root/drivers/xen/xen-front-pgdir-shbuf.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/xen-front-pgdir-shbuf.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/xen-front-pgdir-shbuf.c')
-rw-r--r--drivers/xen/xen-front-pgdir-shbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/xen/xen-front-pgdir-shbuf.c b/drivers/xen/xen-front-pgdir-shbuf.c
index b6433761d42c..bef8d72a6ca6 100644
--- a/drivers/xen/xen-front-pgdir-shbuf.c
+++ b/drivers/xen/xen-front-pgdir-shbuf.c
@@ -135,7 +135,7 @@ void xen_front_pgdir_shbuf_free(struct xen_front_pgdir_shbuf *buf)
for (i = 0; i < buf->num_grefs; i++)
if (buf->grefs[i] != INVALID_GRANT_REF)
- gnttab_end_foreign_access(buf->grefs[i], 0UL);
+ gnttab_end_foreign_access(buf->grefs[i], NULL);
}
kfree(buf->grefs);
kfree(buf->directory);