[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] xen-bus: check whether the frontend is active d
From: |
Anthony PERARD |
Subject: |
Re: [Qemu-devel] [PATCH] xen-bus: check whether the frontend is active during device reset... |
Date: |
Wed, 11 Sep 2019 10:04:51 +0100 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
On Tue, Sep 10, 2019 at 06:17:53PM +0100, Paul Durrant wrote:
> ...not the backend
>
> Commit cb323146 "xen-bus: Fix backend state transition on device reset"
> contained a subtle mistake. The hunk
>
> @@ -539,11 +556,11 @@ static void xen_device_backend_changed(void *opaque)
>
> /*
> * If the toolstack (or unplug request callback) has set the backend
> - * state to Closing, but there is no active frontend (i.e. the
> - * state is not Connected) then set the backend state to Closed.
> + * state to Closing, but there is no active frontend then set the
> + * backend state to Closed.
> */
> if (xendev->backend_state == XenbusStateClosing &&
> - xendev->frontend_state != XenbusStateConnected) {
> + !xen_device_state_is_active(state)) {
> xen_device_backend_set_state(xendev, XenbusStateClosed);
> }
>
> mistakenly replaced the check of 'xendev->frontend_state' with a check
> (now in a helper function) of 'state', which actually equates to
> 'xendev->backend_state'.
>
> This patch fixes the mistake.
>
> Fixes: cb3231460747552d70af9d546dc53d8195bcb796
> Signed-off-by: Paul Durrant <address@hidden>
Reviewed-by: Anthony PERARD <address@hidden>
Thanks,
--
Anthony PERARD