Re: [PATCH 2/2] vhost: disentangle vring endianness stuff from the core code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 10 Feb 2016 14:23:33 +0100
Cornelia Huck <cornelia.huck@xxxxxxxxxx> wrote:

> On Wed, 10 Feb 2016 14:08:43 +0100
> Greg Kurz <gkurz@xxxxxxxxxxxxxxxxxx> wrote:
> 
> > But you are right, there is a bug: we should rollback if vhost_init_used()
> > fails. Something like below:
> > 
> >  err_used:
> >         vq->private_data = oldsock;
> >         vhost_net_enable_vq(n, vq);
> > +       vhost_adjust_vring_endian(vq);  
> 
> Shouldn't we switch back before we reenable? Or have I lost myself in
> this maze here again?
> 

I haven't spotted any path under vhost_net_enable_vq() that needs
the vring endianness, but indeed it looks safer to switch back
before a worker thread may be woken up.

> >         if (ubufs)
> >                 vhost_net_ubuf_put_wait_and_free(ubufs);
> >  err_ubufs:  

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux