]> git.proxmox.com Git - mirror_qemu.git/commit
chardev: update net listener gcontext
authorPeter Xu <peterx@redhat.com>
Tue, 6 Mar 2018 05:33:14 +0000 (13:33 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 12 Mar 2018 15:12:46 +0000 (16:12 +0100)
commit3da9de5ce22125c917f722f13f91a0e3b096a251
treef5acd9ad1dc1b1ebbd9d2d16428ecb8a3dbff8a1
parentc863fdec6aff6b5a4ca8fff1537b80d9f8b97726
chardev: update net listener gcontext

TCP chardevs can be using QIO network listeners working in the
background when in listening mode.  However the network listeners are
always running in main context.  This can race with chardevs that are
running in non-main contexts.

To solve this, we need to re-setup the net listeners in
tcp_chr_update_read_handler() with the newly cached gcontext.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180306053320.15401-4-peterx@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
chardev/char-socket.c