Re: [libvirt] [PATCH]: Fix allocation of tapfds when starting qemu

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

 



On Thu, Jun 19, 2008 at 12:06:28PM +0200, Chris Lalancette wrote:
> All,
>      When doing the conversion to danpb's new memory API, a small bug was
> introduced into the qemudNetworkIfaceConnect() function.  In particular, there
> is a call:
> 
>     if (VIR_ALLOC_N(vm->tapfds, vm->ntapfds+2) < 0)
>         goto no_memory;
> 
> However, the tapfds structure is used to track *all* of the tap fds, and is
> called once for each network that is being attached to the domain.  VIR_ALLOC_N
> maps to calloc().  So the first network would work just fine, but if you had
> more than one network, subsequent calls to this function would blow away the
> stored fd's that were already there and fill them all in with zeros.  This

Ahhh, so this is why it was only hitting oVirt - all my tests normally 
just had a single network interface.

Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]