]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xen/events: fix race in evtchn_fifo_unmask()
authorJuergen Gross <jgross@suse.com>
Tue, 20 Oct 2020 04:52:55 +0000 (06:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Nov 2020 10:08:36 +0000 (11:08 +0100)
commitc7f95d899f492c1615538cbebdb781e4a1e7b7cf
tree0474cadd732fa3e3daa1e6434b518531a7d78173
parent25f6b08895d579b461487291d6e48b3953a8bf65
xen/events: fix race in evtchn_fifo_unmask()

commit f01337197419b7e8a492e83089552b77d3b5fb90 upstream.

Unmasking a fifo event channel can result in unmasking it twice, once
directly in the kernel and once via a hypercall in case the event was
pending.

Fix that by doing the local unmask only if the event is not pending.

This is part of XSA-332.

Cc: stable@vger.kernel.org
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/xen/events/events_fifo.c