linux/drivers/tty/hvc
David Vrabel 8d3cbb9096 xen/events: don't bind non-percpu VIRQs with percpu chip
commit 77bb3dfdc0 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-06 08:19:32 -07:00
..
Kconfig tty: Added a CONFIG_TTY option to allow removal of TTY 2013-01-18 16:15:27 -08:00
Makefile tty: powerpc: remove hvc_iseries 2012-03-09 10:35:17 +11:00
hvc_beat.c serial: Kill off NO_IRQ 2012-01-26 17:14:50 -08:00
hvc_bfin_jtag.c hvc: add Blackfin JTAG console support 2011-02-17 11:12:40 -08:00
hvc_console.c drivers/tty/hvc: don't free hvc_console_setup after init 2014-05-13 13:32:46 +02:00
hvc_console.h tty/hvc_console: Add DTR/RTS callback to handle HUPCL control 2013-07-24 15:21:13 -07:00
hvc_dcc.c TTY: hvc_dcc: probe for a JTAG connection before registering 2013-09-25 18:10:56 -07:00
hvc_irq.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
hvc_iucv.c s390/hvc_iucv: Automatically assign free HVC terminal devices 2014-01-22 14:02:13 +01:00
hvc_opal.c drivers/tty/hvc: don't use module_init in non-modular hyp. console code 2014-02-07 08:40:54 -08:00
hvc_rtas.c drivers/tty/hvc: don't use module_init in non-modular hyp. console code 2014-02-07 08:40:54 -08:00
hvc_tile.c tile: various console improvements 2013-08-12 14:46:18 -04:00
hvc_udbg.c drivers/tty/hvc: don't use module_init in non-modular hyp. console code 2014-02-07 08:40:54 -08:00
hvc_vio.c hvc_vio: Do not override preferred console set by kernel parameter 2013-09-26 15:56:15 -07:00
hvc_xen.c xen/events: don't bind non-percpu VIRQs with percpu chip 2015-06-06 08:19:32 -07:00
hvcs.c drivers/tty/hvc: Use strlcpy instead of strncpy 2013-03-05 16:56:27 +11:00
hvsi.c TTY: add tty_port_tty_wakeup helper 2013-03-18 16:19:45 -07:00
hvsi_lib.c tty: delete non-required instances of include <linux/init.h> 2014-01-07 17:05:21 -08:00