]> git.ipfire.org Git - thirdparty/qemu.git/commit
do not call vhost_net_cleanup() on running net from char user event
authorDan Streetman <ddstreet@canonical.com>
Tue, 16 Apr 2019 18:46:24 +0000 (14:46 -0400)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 9 Jul 2019 18:31:11 +0000 (13:31 -0500)
commitf56e70ee4f47a4232c99764f0508cd37b97ca425
tree559297467a3bc10730e55b06e3f95f3c38254b75
parent8a5aaad6c2a46a64a54a06967840ef2ee158be84
do not call vhost_net_cleanup() on running net from char user event

Buglink: https://launchpad.net/bugs/1823458
Currently, a user CHR_EVENT_CLOSED event will cause net_vhost_user_event()
to call vhost_user_cleanup(), which calls vhost_net_cleanup() for all
its queues.  However, vhost_net_cleanup() must never be called like
this for fully-initialized nets; when other code later calls
vhost_net_stop() - such as from virtio_net_vhost_status() - it will try
to access the already-cleaned-up fields and fail with assertion errors
or segfaults.

The vhost_net_cleanup() will eventually be called from
qemu_cleanup_net_client().

Signed-off-by: Dan Streetman <ddstreet@canonical.com>
Message-Id: <20190416184624.15397-3-dan.streetman@canonical.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 6ab79a20af3a7b3bf610ba9aebb446a9f0b05930)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
net/vhost-user.c