linux/drivers/xen
Souptick Joarder e622fafb4a xen/gntdev.c: Mark pages as dirty
commit 779055842d 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: 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>
[jinoh: backport accounting for missing
  commit 73b0140bf0 ("mm/gup: change GUP fast to use flags rather than a write 'bool'")]
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-06 14:44:59 +01:00
..
events xen/events: block rogue events for some time 2020-11-05 11:08:37 +01:00
xen-pciback xen/xenbus: Add 'will_handle' callback support in xenbus_watch_path() 2020-12-30 11:26:17 +01:00
xenbus xenbus/xenbus_backend: Disallow pending watch messages 2020-12-30 11:26:17 +01:00
xenfs
acpi.c
arm-device.c
balloon.c xen/balloon: make the balloon wait interruptible 2020-08-19 08:15:07 +02:00
biomerge.c
cpu_hotplug.c xen, cpu_hotplug: Prevent an out of bounds access 2020-01-27 14:50:31 +01:00
dbgp.c
efi.c
evtchn.c xen/events: switch user event channels to lateeoi model 2020-11-05 11:08:37 +01:00
fallback.c
features.c
gntalloc.c
gntdev-common.h
gntdev-dmabuf.c xen/gntdev: Fix dmabuf import with non-zero sgt offset 2020-08-19 08:15:07 +02:00
gntdev-dmabuf.h xen/gntdev: Do not destroy context while dma-bufs are in use 2019-04-05 22:33:06 +02:00
gntdev.c xen/gntdev.c: Mark pages as dirty 2021-01-06 14:44:59 +01:00
grant-table.c
Kconfig xen/gntdev: Use select for DMA_SHARED_BUFFER 2019-12-31 16:35:50 +01:00
Makefile
manage.c
mcelog.c
mem-reservation.c
pci.c xen/pci: reserve MCFG areas earlier 2019-10-11 18:21:13 +02:00
pcpu.c
platform-pci.c
preempt.c xen: don't reschedule in preemption off sections 2020-08-26 10:31:06 +02:00
privcmd-buf.c
privcmd.c
privcmd.h
pvcalls-back.c xen/pvcallsback: use lateeoi irq binding 2020-11-05 11:08:37 +01:00
pvcalls-front.c pvcalls-front: don't return error when the ring is full 2019-12-17 20:35:32 +01:00
pvcalls-front.h
swiotlb-xen.c xen/swiotlb: fix condition for calling xen_destroy_contiguous_region() 2019-08-06 19:06:55 +02:00
sys-hypervisor.c
time.c
tmem.c
xen-acpi-cpuhotplug.c
xen-acpi-memhotplug.c
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c xen/balloon: Support xend-based toolstack take two 2020-02-11 04:34:08 -08:00
xen-scsiback.c xen/scsiback: use lateeoi irq binding 2020-11-05 11:08:36 +01:00
xen-selfballoon.c
xen-stub.c
xlate_mmu.c