diff options
author | Juergen Gross <jgross@suse.com> | 2022-05-24 14:46:30 +0300 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2022-05-27 12:05:29 +0300 |
commit | 49f8b459fc1de5e3712b57c8ccefae9ec45270f8 (patch) | |
tree | a94aa459860a3d82cae0933e922e1cbfaa980766 /drivers/input | |
parent | 5b3353949e89d48b4faf54a9cc241ee5d70df615 (diff) | |
download | linux-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/input')
-rw-r--r-- | drivers/input/misc/xen-kbdfront.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c index 1fc9b3e7007f..8d8ebdc2039b 100644 --- a/drivers/input/misc/xen-kbdfront.c +++ b/drivers/input/misc/xen-kbdfront.c @@ -481,7 +481,7 @@ static int xenkbd_connect_backend(struct xenbus_device *dev, error_evtchan: xenbus_free_evtchn(dev, evtchn); error_grant: - gnttab_end_foreign_access(info->gref, 0UL); + gnttab_end_foreign_access(info->gref, NULL); info->gref = -1; return ret; } @@ -492,7 +492,7 @@ static void xenkbd_disconnect_backend(struct xenkbd_info *info) unbind_from_irqhandler(info->irq, info); info->irq = -1; if (info->gref >= 0) - gnttab_end_foreign_access(info->gref, 0UL); + gnttab_end_foreign_access(info->gref, NULL); info->gref = -1; } |