diff options
author | Souptick Joarder <jrdr.linux@gmail.com> | 2020-09-06 12:21:53 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-01 12:47:09 +0100 |
commit | 4683c5407bd5ed473063993b7593f5d8084daceb (patch) | |
tree | 18543b2466157090262020de107b79278e017a87 /mm/rmap.c | |
parent | 95528c8042a412a77e4769a2ff2abf31fee08b0d (diff) | |
download | linux-stable-4683c5407bd5ed473063993b7593f5d8084daceb.tar.gz linux-stable-4683c5407bd5ed473063993b7593f5d8084daceb.tar.bz2 linux-stable-4683c5407bd5ed473063993b7593f5d8084daceb.zip |
xen/gntdev.c: Mark pages as dirty
commit 779055842da5b2e508f3ccf9a8153cb1f704f566 upstream.
There seems to be a bug in the original code when gntdev_get_page()
is called with writeable=true then the page needs to be marked dirty
before being put.
To address this, a bool writeable is added in gnt_dev_copy_batch, set
it in gntdev_grant_copy_seg() (and drop `writeable` argument to
gntdev_get_page()) and then, based on batch->writeable, use
set_page_dirty_lock().
Fixes: a4cdb556cae0 (xen/gntdev: add ioctl for grant copy)
Suggested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/1599375114-32360-1-git-send-email-jrdr.linux@gmail.com
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/rmap.c')
0 files changed, 0 insertions, 0 deletions