android_kernel_google_msm/drivers/xen
David Vrabel 0b80fa4b24 xen/events: don't bind non-percpu VIRQs with percpu chip
commit 77bb3dfdc0d554befad58fdefbc41be5bc3ed38a upstream.

A non-percpu VIRQ (e.g., VIRQ_CONSOLE) may be freed on a different
VCPU than it is bound to.  This can result in a race between
handle_percpu_irq() and removing the action in __free_irq() because
handle_percpu_irq() does not take desc->lock.  The interrupt handler
sees a NULL action and oopses.

Only use the percpu chip/handler for per-CPU VIRQs (like VIRQ_TIMER).

  # cat /proc/interrupts | grep virq
   40:      87246          0  xen-percpu-virq      timer0
   44:          0          0  xen-percpu-virq      debug0
   47:          0      20995  xen-percpu-virq      timer1
   51:          0          0  xen-percpu-virq      debug1
   69:          0          0   xen-dyn-virq      xen-pcpu
   74:          0          0   xen-dyn-virq      mce
   75:         29          0   xen-dyn-virq      hvc_console

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
[lizf: Backported to 3.4: adjust filename]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-09-18 09:20:42 +08:00
..
xen-pciback xen-pciback: Add name prefix to global 'permissive' variable 2015-06-19 11:40:35 +08:00
xenbus xen/xenbus: Add quirk to deal with misconfigured backends. 2012-04-19 12:45:01 -04:00
xenfs
balloon.c
biomerge.c
cpu_hotplug.c
events.c xen/events: don't bind non-percpu VIRQs with percpu chip 2015-09-18 09:20:42 +08:00
evtchn.c xen/evtchn: avoid a deadlock when unbinding an event channel 2013-08-04 16:26:00 +08:00
features.c
gntalloc.c
gntdev.c xen/gntdev: don't leak memory from IOCTL_GNTDEV_MAP_GRANT_REF 2012-11-17 13:15:54 -08:00
grant-table.c xen-gnt: prevent adding duplicate gnt callbacks 2013-09-26 17:15:30 -07:00
Kconfig xen/Kconfig: fix Kconfig layout 2012-05-07 12:26:28 -04:00
Makefile xen/acpi-processor: C and P-state driver that uploads said data to hypervisor. 2012-03-14 12:35:42 -04:00
manage.c xen/manage: Always freeze/thaw processes when suspend/resuming 2014-12-01 18:02:25 +08:00
pci.c
platform-pci.c xen: initialize platform-pci even if xen_emul_unplug=never 2012-03-22 11:37:11 -04:00
privcmd.c
privcmd.h
swiotlb-xen.c xen: Use correct masking in xen_swiotlb_alloc_coherent. 2012-09-14 10:00:33 -07:00
sys-hypervisor.c xen: constify all instances of "struct attribute_group" 2012-03-14 12:34:19 -04:00
tmem.c One tiny feature that accidentally got lost in the initial git pull: 2012-03-24 12:20:25 -07:00
xen-acpi-processor.c xen/acpi: Workaround broken BIOSes exporting non-existing C-states. 2012-04-26 22:07:28 -04:00
xen-balloon.c Features: 2012-03-22 20:16:14 -07:00
xen-selfballoon.c xen: constify all instances of "struct attribute_group" 2012-03-14 12:34:19 -04:00
xencomm.c