Skip to content
Commit c70b7741 authored by Volodymyr Babchuk's avatar Volodymyr Babchuk Committed by Juergen Gross
Browse files

xen/pvcalls-back: fix permanently masked event channel



There is a sequence of events that can lead to a permanently masked
event channel, because xen_irq_lateeoi() is newer called. This happens
when a backend receives spurious write event from a frontend. In this
case pvcalls_conn_back_write() returns early and it does not clears the
map->write counter. As map->write > 0, pvcalls_back_ioworker() returns
without calling xen_irq_lateeoi(). This leaves the event channel in
masked state, a backend does not receive any new events from a
frontend and the whole communication stops.

Move atomic_set(&map->write, 0) to the very beginning of
pvcalls_conn_back_write() to fix this issue.

Signed-off-by: default avatarVolodymyr Babchuk <volodymyr_babchuk@epam.com>
Reported-by: default avatarOleksii Moisieiev <oleksii_moisieiev@epam.com>
Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20230119211037.1234931-1-volodymyr_babchuk@epam.com
Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
parent 3e8cd711
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment