]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.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)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 10 Dec 2020 11:02:37 +0000 (12:02 +0100)
commit3b258673f52ab0a04f8db9327457828910fc89c7
treea5389c6eff753d0c5e082ec6a24248e84e2a2917
parente5a46bbf6e1d9d754ae065873b331f068330710f
xen/events: fix race in evtchn_fifo_unmask()

BugLink: https://bugs.launchpad.net/bugs/1904450
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: William Breathitt Gray <william.gray@canonical.com>
drivers/xen/events/events_fifo.c