projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1940cd
)
virtio: make del_vqs idempotent
author
Michael S. Tsirkin
<mst@redhat.com>
Sun, 4 Jan 2015 15:21:58 +0000
(17:21 +0200)
committer
Michael S. Tsirkin
<mst@redhat.com>
Tue, 6 Jan 2015 14:35:35 +0000
(16:35 +0200)
Our code calls del_vqs multiple times, assuming
it's idempotent.
commit
3ec7a77bb3089bb01032fdbd958eb5c29da58b49
virtio_pci: free up vq->priv
broke this assumption, by adding kfree there,
so multiple calls cause double free.
Fix it up.
Fixes:
3ec7a77bb3089bb01032fdbd958eb5c29da58b49
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_pci_common.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/virtio/virtio_pci_common.c
b/drivers/virtio/virtio_pci_common.c
index 2ef9529809d8bd198455a1af19151c22fe4ca715..5243868efd9a739019c623641a879d1103e036e4 100644
(file)
--- a/
drivers/virtio/virtio_pci_common.c
+++ b/
drivers/virtio/virtio_pci_common.c
@@
-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,