xen/scsiback: use lateeoi irq binding
authorJuergen Gross <jgross@suse.com>
Mon, 7 Sep 2020 13:47:28 +0000 (15:47 +0200)
committerJuergen Gross <jgross@suse.com>
Tue, 20 Oct 2020 08:22:04 +0000 (10:22 +0200)
commit86991b6e7ea6c613b7692f65106076943449b6b7
tree8a1772d036b8ac3c3e916762b3710e085a21ebcd
parent23025393dbeb3b8b3b60ebfa724cdae384992e27
xen/scsiback: use lateeoi irq binding

In order to reduce the chance for the system becoming unresponsive due
to event storms triggered by a misbehaving scsifront use the lateeoi
irq binding for scsiback and unmask the event channel only just before
leaving the event handling function.

In case of a ring protocol error don't issue an EOI in order to avoid
the possibility to use that for producing an event storm. This at once
will result in no further call of scsiback_irq_fn(), so the ring_error
struct member can be dropped and scsiback_do_cmd_fn() can signal the
protocol error via a negative return value.

This is part of XSA-332.

Cc: stable@vger.kernel.org
Reported-by: Julien Grall <julien@xen.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wl@xen.org>
drivers/xen/xen-scsiback.c