• M
    qemuOpenVhostNet: Decrease vhostfdSize on open failure · d10cfaec
    Michal Privoznik 提交于
    Currently, if there's an error opening /dev/vhost-net (e.g. because
    it doesn't exist) but it's not required we proceed with vhostfd array
    filled with -1 and vhostfdSize unchanged. Later, when constructing
    the qemu command line only non-negative items within vhostfd array
    are taken into account. This means, vhostfdSize may be greater than
    the actual count of non-negative items in vhostfd array. This results
    in improper command line arguments being generated, e.g.:
    
    -netdev tap,fd=21,id=hostnet0,vhost=on,vhostfd=(null)
    d10cfaec
qemu_command.c 372.9 KB