From c65ff10063a6c599b88cba27fd70a72e2e0cc0ff Mon Sep 17 00:00:00 2001 From: Jinhua Cao Date: Thu, 10 Feb 2022 20:21:33 +0800 Subject: [PATCH] vhost-user: add unregister_savevm when vhost-user cleanup commit 12cf5e9ece ("vhost-user: add vhost_set_mem_table when vm load_setup at destination") only register savevm handler but not unregister it, which will cause the number of handers increase when vhost-user devices hotplug, so this commit add unregister_savevm when vhost-user cleanup. Fixes: 12cf5e9ece ("vhost-user: add vhost_set_mem_table when vm load_setup at destination") Signed-off-by: Jinhua Cao --- hw/virtio/vhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 6739dfc98e..e589ee3572 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -2310,6 +2310,7 @@ static int vhost_user_backend_cleanup(struct vhost_dev *dev) u->region_rb_len = 0; g_free(u); dev->opaque = 0; + unregister_savevm(NULL, "vhost-user", dev); return 0; } -- 2.27.0