[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 2/2] do not call vhost_net_cleanup() on running net
From: |
Dan Streetman |
Subject: |
[Qemu-stable] [PATCH 2/2] do not call vhost_net_cleanup() on running net from char user event |
Date: |
Tue, 16 Apr 2019 14:46:24 -0400 |
From: Dan Streetman <address@hidden>
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 <address@hidden>
---
net/vhost-user.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/vhost-user.c b/net/vhost-user.c
index 5a26a24708..51921de443 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -236,7 +236,6 @@ static void chr_closed_bh(void *opaque)
s = DO_UPCAST(NetVhostUserState, nc, ncs[0]);
qmp_set_link(name, false, &err);
- vhost_user_stop(queues, ncs);
qemu_chr_fe_set_handlers(&s->chr, NULL, NULL, net_vhost_user_event,
NULL, opaque, NULL, true);
--
2.20.1
[Qemu-stable] [PATCH 2/2] do not call vhost_net_cleanup() on running net from char user event,
Dan Streetman <=
Re: [Qemu-stable] [PATCH 0/2] vhost-user race condition on shutdown, Michael S. Tsirkin, 2019/04/19