projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60f0779
)
virtio: Keep vring_del_virtqueue() mirror of VQ create
author
Parav Pandit
<parav@nvidia.com>
Wed, 21 Jul 2021 14:26:46 +0000
(17:26 +0300)
committer
Michael S. Tsirkin
<mst@redhat.com>
Tue, 10 Aug 2021 15:50:55 +0000
(11:50 -0400)
Keep the vring_del_virtqueue() mirror of the create routines.
i.e. to delete list entry first as it is added last during the create
routine.
Signed-off-by: Parav Pandit <parav@nvidia.com>
Link:
https://lore.kernel.org/r/20210721142648.1525924-3-parav@nvidia.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_ring.c
patch
|
blob
|
history
diff --git
a/drivers/virtio/virtio_ring.c
b/drivers/virtio/virtio_ring.c
index e179c7c7622cdb49ccde9a411abcd7ecc07ddf2d..d5934c2e5a899870c5b5190cba3ce0979682b844 100644
(file)
--- a/
drivers/virtio/virtio_ring.c
+++ b/
drivers/virtio/virtio_ring.c
@@
-2291,6
+2291,8
@@
void vring_del_virtqueue(struct virtqueue *_vq)
{
struct vring_virtqueue *vq = to_vvq(_vq);
+ list_del(&_vq->list);
+
if (vq->we_own_ring) {
if (vq->packed_ring) {
vring_free_queue(vq->vq.vdev,
@@
-2321,7
+2323,6
@@
void vring_del_virtqueue(struct virtqueue *_vq)
kfree(vq->split.desc_state);
kfree(vq->split.desc_extra);
}
- list_del(&_vq->list);
kfree(vq);
}
EXPORT_SYMBOL_GPL(vring_del_virtqueue);