Skip to content

Commit

Permalink
hw/xen: take iothread mutex in xen_evtchn_reset_op()
Browse files Browse the repository at this point in the history
The xen_evtchn_soft_reset() function requires the iothread mutex, but is
also called for the EVTCHNOP_reset hypercall. Ensure the mutex is taken
in that case.

Cc: qemu-stable@nongnu.org
Fixes: a15b109 ("hw/xen: Implement EVTCHNOP_reset")
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
(cherry picked from commit debc995)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
dwmw2 authored and Michael Tokarev committed Nov 9, 2023
1 parent b644416 commit 30a4cc2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hw/i386/kvm/xen_evtchn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,7 @@ int xen_evtchn_reset_op(struct evtchn_reset *reset)
return -ESRCH;
}

QEMU_IOTHREAD_LOCK_GUARD();
return xen_evtchn_soft_reset();
}

Expand Down

0 comments on commit 30a4cc2

Please sign in to comment.