mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 16:53:54 +08:00
virtio: make del_vqs idempotent
Our code calls del_vqs multiple times, assuming it's idempotent. commit3ec7a77bb3
virtio_pci: free up vq->priv broke this assumption, by adding kfree there, so multiple calls cause double free. Fix it up. Fixes:3ec7a77bb3
Reported-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
b1940cd21c
commit
80e9541f79
@ -282,6 +282,7 @@ void vp_del_vqs(struct virtio_device *vdev)
|
||||
|
||||
vp_free_vectors(vdev);
|
||||
kfree(vp_dev->vqs);
|
||||
vp_dev->vqs = NULL;
|
||||
}
|
||||
|
||||
static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs,
|
||||
|
Loading…
Reference in New Issue
Block a user