]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/events/fifo: Handle linked events when closing a port
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Fri, 31 Jul 2015 13:30:42 +0000 (14:30 +0100)
committerElena Ufimtseva <elena.ufimtseva@oracle.com>
Wed, 12 Aug 2015 10:07:28 +0000 (06:07 -0400)
commit78e881b5e4bad3ac24089fd60b73ae6a5532ff55
tree40fea1c068a1d739beaeca7fd2b5b1fa1dfbd55f
parent349edb44eceb3450a9439983d68385f9d9ea465e
xen/events/fifo: Handle linked events when closing a port

An event channel bound to a CPU that was offlined may still be linked
on that CPU's queue.  If this event channel is closed and reused,
subsequent events will be lost because the event channel is never
unlinked and thus cannot be linked onto the correct queue.

When a channel is closed and the event is still linked into a queue,
ensure that it is unlinked before completing.

If the CPU to which the event channel bound is online, spin until the
event is handled by that CPU. If that CPU is offline, it can't handle
the event, so clear the event queue during the close, dropping the
events.

This fixes the missing interrupts (and subsequent disk stalls etc.)
when offlining a CPU.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
(cherry picked from commit fcdf31a7c162de0c93a2bee51df4688ab0a348f8)
Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
drivers/xen/events/events_base.c
drivers/xen/events/events_fifo.c
drivers/xen/events/events_internal.h