vhost: fix the fd leak
commit18f2971ce403008d5e1c2875b483c9d1778143dc
authorLi Feng <fengli@smartx.com>
Mon, 31 Jul 2023 12:10:06 +0000 (31 20:10 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 3 Aug 2023 20:06:49 +0000 (3 16:06 -0400)
tree14167bc0322a9a1eb63aaf536e3a98f7aa729f85
parent348e354417b64c484877354ee7cc66f29fa6c7df
vhost: fix the fd leak

When the vhost-user reconnect to the backend, the notifer should be
cleanup. Otherwise, the fd resource will be exhausted.

Fixes: f9a09ca3ea ("vhost: add support for configure interrupt")

Signed-off-by: Li Feng <fengli@smartx.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <20230731121018.2856310-2-fengli@smartx.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
hw/virtio/vhost.c