[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] tap: clear vhost_net backend on cleanup
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PATCH] tap: clear vhost_net backend on cleanup |
Date: |
Wed, 27 Oct 2010 20:03:43 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Frontends calling tap_get_vhost_net get an invalid pointer after the
peer backend has been deleted. Jason Wang <address@hidden> reports
this leading to a crash in ack_features when we remove the vhost-net
bakend of a virtio nic.
The fix is simply to clear the backend pointer.
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
Jason, could you please confirm whether this patch
will fix the issue you have observed?
Thanks,
net/tap.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/tap.c b/net/tap.c
index 0147dab..4cfa538 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -258,6 +258,7 @@ static void tap_cleanup(VLANClientState *nc)
if (s->vhost_net) {
vhost_net_cleanup(s->vhost_net);
+ s->vhost_net = NULL;
}
qemu_purge_queued_packets(nc);
--
1.7.3.2.91.g446ac
- [Qemu-devel] [PATCH] tap: clear vhost_net backend on cleanup,
Michael S. Tsirkin <=