]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xen/events: fix race in evtchn_fifo_unmask()
authorJuergen Gross <jgross@suse.com>
Tue, 3 Nov 2020 14:29:01 +0000 (15:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 17:28:01 +0000 (18:28 +0100)
commit5bb3ef08f7042bbc8b5c65db43f48618ef5f6eb2
tree507cc11dbf2e8c0c8134b2f2ebf99329dd55ffe4
parent025ea15db5665fa14d1c48e39aa788acaf30471b
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