diff mbox

Saving a guest crashes dom0

Message ID 7a7f4f35db514e0fa112e59dd2e686be@AMSPEX02CL03.citrite.net (mailing list archive)
State New, archived
Headers show

Commit Message

Paul Durrant May 18, 2016, 2:27 p.m. UTC
> > -----Original Message-----
> > From: Paul Durrant
> > Sent: 18 May 2016 15:18
> > To: 'Boris Ostrovsky'; xen-devel
> > Subject: RE: Saving a guest crashes dom0
> >
> > > -----Original Message-----
> > > From: Boris Ostrovsky [mailto:boris.ostrovsky@oracle.com]
> > > Sent: 18 May 2016 14:54
> > > To: xen-devel; Paul Durrant
> > > Subject: Saving a guest crashes dom0
> > >
> > > Saving a guest (xl save) crashes dom0, log below.
> > >
> > > Paul, this seems to be happening in the code that you modified
> > > recently.  If you don't have time I can look at this but it will
> > > probably have to wait until tomorrow.
> > >
> >
> > No, this looks problematic, I'll look now... What was the guest?
> >
> 
> Never mind. I see the problem. Disconnection of the control ring is done
> regardless of whether a control ring was connected and the hash deinit is not
> adequately protected. I'll come up with a patch.
> 

This should fix the problem for you:

Comments

Boris Ostrovsky May 18, 2016, 2:56 p.m. UTC | #1
On 05/18/2016 10:27 AM, Paul Durrant wrote:
> This should fix the problem for you:


Yes, that does it. Thanks.

-boris


>
> diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
> index 1c7f49b..83deeeb 100644
> --- a/drivers/net/xen-netback/interface.c
> +++ b/drivers/net/xen-netback/interface.c
> @@ -780,9 +780,8 @@ void xenvif_disconnect_ctrl(struct xenvif *vif)
>                 vif->ctrl_task = NULL;
>         }
>
> -       xenvif_deinit_hash(vif);
> -
>         if (vif->ctrl_irq) {
> +               xenvif_deinit_hash(vif);
>                 unbind_from_irqhandler(vif->ctrl_irq, vif);
>                 vif->ctrl_irq = 0;
>         }
Paul Durrant May 18, 2016, 2:59 p.m. UTC | #2
> -----Original Message-----

> From: Boris Ostrovsky [mailto:boris.ostrovsky@oracle.com]

> Sent: 18 May 2016 15:57

> To: Paul Durrant; xen-devel

> Subject: Re: Saving a guest crashes dom0

> 

> On 05/18/2016 10:27 AM, Paul Durrant wrote:

> > This should fix the problem for you:

> 

> 

> Yes, that does it. Thanks.


Brilliant :-) I'll post now.

  Paul

> 

> -boris

> 

> 

> >

> > diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-

> netback/interface.c

> > index 1c7f49b..83deeeb 100644

> > --- a/drivers/net/xen-netback/interface.c

> > +++ b/drivers/net/xen-netback/interface.c

> > @@ -780,9 +780,8 @@ void xenvif_disconnect_ctrl(struct xenvif *vif)

> >                 vif->ctrl_task = NULL;

> >         }

> >

> > -       xenvif_deinit_hash(vif);

> > -

> >         if (vif->ctrl_irq) {

> > +               xenvif_deinit_hash(vif);

> >                 unbind_from_irqhandler(vif->ctrl_irq, vif);

> >                 vif->ctrl_irq = 0;

> >         }
diff mbox

Patch

diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index 1c7f49b..83deeeb 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -780,9 +780,8 @@  void xenvif_disconnect_ctrl(struct xenvif *vif)
                vif->ctrl_task = NULL;
        }

-       xenvif_deinit_hash(vif);
-
        if (vif->ctrl_irq) {
+               xenvif_deinit_hash(vif);
                unbind_from_irqhandler(vif->ctrl_irq, vif);
                vif->ctrl_irq = 0;
        }