linux-stable/drivers/xen
Souptick Joarder 779055842d xen/gntdev.c: Mark pages as dirty
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: a4cdb556ca (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>
2020-10-04 18:39:18 -05:00
..
events xen/events: don't use chip_data for legacy IRQs 2020-10-01 14:45:26 +02:00
xen-pciback treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
xenbus xen: branch for v5.9-rc4 2020-09-06 09:59:27 -07:00
xenfs
acpi.c
arm-device.c
balloon.c xen: branch for v5.9-rc4 2020-09-06 09:59:27 -07:00
biomerge.c
cpu_hotplug.c xen/cpuhotplug: Fix initial CPU offlining for PV(H) guests 2020-05-21 13:01:45 -05:00
dbgp.c
efi.c xen/efi: have a common runtime setup function 2019-10-02 10:31:07 -04:00
evtchn.c xen: Use evtchn_type_t as a type for event channels 2020-04-07 12:12:54 +02:00
features.c
gntalloc.c
gntdev-common.h xen: Use evtchn_type_t as a type for event channels 2020-04-07 12:12:54 +02:00
gntdev-dmabuf.c xen/gntdev: Fix dmabuf import with non-zero sgt offset 2020-08-13 12:50:22 +02:00
gntdev-dmabuf.h
gntdev.c xen/gntdev.c: Mark pages as dirty 2020-10-04 18:39:18 -05:00
grant-table.c xen: add helpers to allocate unpopulated memory 2020-09-04 10:00:01 +02:00
Kconfig xen: branch for v5.9-rc4 2020-09-06 09:59:27 -07:00
Makefile xen: branch for v5.9-rc4 2020-09-06 09:59:27 -07:00
manage.c
mcelog.c xen/mcelog: add PPIN to record when available 2019-11-14 10:01:57 +01:00
mem-reservation.c
pci.c
pcpu.c
platform-pci.c xen-platform: Constify dev_pm_ops 2020-05-21 13:00:39 -05:00
privcmd-buf.c
privcmd.c xen: branch for v5.9-rc4 2020-09-06 09:59:27 -07:00
privcmd.h
pvcalls-back.c xen/pvcalls: Make pvcalls_back_global static 2020-05-21 13:06:42 -05:00
pvcalls-front.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pvcalls-front.h
swiotlb-xen.c xen/arm: introduce phys/dma translations in xen_dma_sync_for_* 2020-08-04 07:53:52 +02:00
sys-hypervisor.c
time.c READ_ONCE: Enforce atomicity for {READ,WRITE}_ONCE() memory accesses 2020-04-16 12:28:07 +01:00
unpopulated-alloc.c xen: add helpers to allocate unpopulated memory 2020-09-04 10:00:01 +02:00
xen-acpi-cpuhotplug.c
xen-acpi-memhotplug.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c xen/balloon: Support xend-based toolstack take two 2020-01-22 08:58:16 -06:00
xen-front-pgdir-shbuf.c
xen-scsiback.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
xen-stub.c
xlate_mmu.c xen: add helpers to allocate unpopulated memory 2020-09-04 10:00:01 +02:00