1
0
Fork 0
alistair23-linux/drivers/xen
Thomas Gleixner 773dfd2223 xen: Enable interrupts when calling _cond_resched()
commit 8645e56a4a upstream.

xen_maybe_preempt_hcall() is called from the exception entry point
xen_do_hypervisor_callback with interrupts disabled.

_cond_resched() evades the might_sleep() check in cond_resched() which
would have caught that and schedule_debug() unfortunately lacks a check
for irqs_disabled().

Enable interrupts around the call and use cond_resched() to catch future
issues.

Fixes: fdfd811ddd ("x86/xen: allow privcmd hypercalls to be preempted")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/878skypjrh.fsf@nanos.tec.linutronix.de
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-28 17:22:28 +01:00
..
events xen/events: remove unlikely() from WARN() condition 2019-09-26 10:10:17 -07:00
xen-pciback xen/pciback: remove set but not used variable 'old_state' 2019-07-26 10:29:05 +02:00
xenbus xen/xenbus: fix self-deadlock after killing user process 2019-10-02 16:40:11 -04:00
xenfs Merge branch 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-07-19 10:42:02 -07:00
Kconfig xen/gntdev: Use select for DMA_SHARED_BUFFER 2019-12-31 16:45:01 +01:00
Makefile xen: remove tmem driver 2019-07-17 08:09:58 +02:00
acpi.c
arm-device.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
balloon.c xen/balloon: fix ballooned page accounting without hotplug enabled 2020-01-09 10:19:51 +01:00
biomerge.c block: pass page to xen_biovec_phys_mergeable 2019-04-01 12:11:13 -06:00
cpu_hotplug.c xen, cpu_hotplug: Prevent an out of bounds access 2019-03-08 17:58:14 +01:00
dbgp.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
efi.c xen/efi: have a common runtime setup function 2019-10-02 10:31:07 -04:00
evtchn.c xen/events: fix binding user event channels to cpus 2019-07-17 08:09:57 +02:00
features.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
gntalloc.c
gntdev-common.h xen/gntdev: Add initial support for dma-buf UAPI 2018-07-26 23:05:14 -04:00
gntdev-dmabuf.c xen/gntdev: Check and release imported dma-bufs on close 2019-02-18 06:50:10 +01:00
gntdev-dmabuf.h xen/gntdev: Do not destroy context while dma-bufs are in use 2019-02-18 06:50:03 +01:00
gntdev.c xen: Stop abusing DT of_dma_configure API 2019-10-10 11:43:35 -04:00
grant-table.c xen/grant-table: remove unnecessary printing 2019-10-10 10:41:30 -04:00
manage.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
mcelog.c xen/mcelog: eliminate redundant setting of interface version 2018-08-20 14:46:18 -04:00
mem-reservation.c xen/balloon: add runtime control for scrubbing ballooned out pages 2018-09-14 08:51:10 -04:00
pci.c xen/pci: reserve MCFG areas earlier 2019-09-12 15:02:55 -04:00
pcpu.c
platform-pci.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 320 2019-06-05 17:37:05 +02:00
preempt.c xen: Enable interrupts when calling _cond_resched() 2020-02-28 17:22:28 +01:00
privcmd-buf.c xen/privcmd-buf.c: convert to use vm_map_pages_zero() 2019-05-14 09:47:50 -07:00
privcmd.c xen: avoid link error on ARM 2019-07-31 08:14:12 +02:00
privcmd.h xen: add new hypercall buffer mapping device 2018-06-22 08:26:42 +02:00
pvcalls-back.c net: add {READ|WRITE}_ONCE() annotations on ->rskq_accept_head 2019-10-09 21:34:31 -07:00
pvcalls-front.c xen: fixes for 5.2-rc3 2019-05-31 10:53:34 -07:00
pvcalls-front.h xen: fix poll misannotation 2018-02-01 10:07:32 -05:00
swiotlb-xen.c xen: features for 5.4-rc1 2019-09-26 11:22:14 -07:00
sys-hypervisor.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
time.c x86/paravirt: Use a single ops structure 2018-09-03 16:50:35 +02:00
xen-acpi-cpuhotplug.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 12 2019-05-21 11:28:45 +02:00
xen-acpi-memhotplug.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 12 2019-05-21 11:28:45 +02:00
xen-acpi-pad.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
xen-acpi-processor.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
xen-balloon.c xen/balloon: Support xend-based toolstack take two 2020-02-11 04:35:36 -08:00
xen-front-pgdir-shbuf.c xen: Introduce shared buffer helpers for page directory... 2018-12-18 12:15:55 -05:00
xen-scsiback.c xen: fixes and features for 5.1-rc1 2019-03-11 17:08:14 -07:00
xen-stub.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 12 2019-05-21 11:28:45 +02:00
xlate_mmu.c xen: avoid link error on ARM 2019-07-31 08:14:12 +02:00