]> git.baikalelectronics.ru Git - kernel.git/commit
xen/events: avoid handling the same event on two cpus at the same time
authorJuergen Gross <jgross@suse.com>
Sat, 6 Mar 2021 16:18:33 +0000 (17:18 +0100)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Wed, 10 Mar 2021 22:39:29 +0000 (16:39 -0600)
commit88d3b1845089a96750787dc939f17cb4c425f586
tree7c7edc11bd65699263aa50217accb276b9c467e6
parent9eed6306b078bdd85fbe267c5a23d08a0b03b9dd
xen/events: avoid handling the same event on two cpus at the same time

When changing the cpu affinity of an event it can happen today that
(with some unlucky timing) the same event will be handled on the old
and the new cpu at the same time.

Avoid that by adding an "event active" flag to the per-event data and
call the handler only if this flag isn't set.

Cc: stable@vger.kernel.org
Reported-by: Julien Grall <julien@xen.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Link: https://lore.kernel.org/r/20210306161833.4552-4-jgross@suse.com
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
drivers/xen/events/events_base.c