[PATCH] qemu: fd: Fix monitor usage of qemuFDPassDirectGetPath

Ján Tomko jtomko at redhat.com
Fri Jun 3 13:56:07 UTC 2022


On a Friday in 2022, Peter Krempa wrote:
>We need to use the 'name' variable and just overwrite it with the FD
>number when FDs are passed on the monitor. Otherwise we will read NULL
>path if the FD is accessed before being passed on the monitor. The idea
>of this helper is to simplify the monitor code so it would be
>counterproductive to have other behaviour.
>
>Fixes the following symptom:
>
> $ virsh attach-interface cd network default --model virtio
> error: Failed to attach interface
> error: internal error: unable to execute QEMU command 'netdev_add': File descriptor named '(null)' has not been found
>
>Fixes: bca9047906fd73fd30f275dd45b64998fbbcf6de
>Resolves: https://gitlab.com/libvirt/libvirt/-/issues/318
>Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2092856
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_fd.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220603/12cfecc7/attachment.sig>


More information about the libvir-list mailing list