From: Jan Beulich Date: Thu, 4 Feb 2021 13:01:21 +0000 (+0100) Subject: IOREQ: fix waiting for broadcast completion X-Git-Tag: archive/raspbian/4.16.0+51-g0941d6cb-1+rpi1~2^2~42^2~950 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=da20c93108226cb2eb2ed1a13225337f2318a642;p=xen.git IOREQ: fix waiting for broadcast completion Checking just a single server is not enough - all of them must have signaled that they're done processing the request. Signed-off-by: Jan Beulich Reviewed-by: Paul Durrant --- diff --git a/xen/common/ioreq.c b/xen/common/ioreq.c index 90ed2e0302..5b603c0520 100644 --- a/xen/common/ioreq.c +++ b/xen/common/ioreq.c @@ -213,9 +213,9 @@ bool vcpu_ioreq_handle_completion(struct vcpu *v) return false; } - sv = get_pending_vcpu(v, &s); - if ( sv && !wait_for_io(sv, get_ioreq(s, v)) ) - return false; + while ( (sv = get_pending_vcpu(v, &s)) != NULL ) + if ( !wait_for_io(sv, get_ioreq(s, v)) ) + return false; vio->req.state = ioreq_needs_completion(&vio->req) ? STATE_IORESP_READY : STATE_IOREQ_NONE;