[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180316152318.866123947@linuxfoundation.org>
Date: Fri, 16 Mar 2018 16:22:45 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Andy Lutomirski <luto@...nel.org>,
"Michael S. Tsirkin" <mst@...hat.com>,
Tiwei Bie <tiwei.bie@...el.com>
Subject: [PATCH 4.9 22/86] virtio_ring: fix num_free handling in error case
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tiwei Bie <tiwei.bie@...el.com>
commit e82df670235138575b37ff0ec24412a471efd97f upstream.
The vq->vq.num_free hasn't been changed when error happens,
so it shouldn't be changed when handling the error.
Fixes: 780bc7903a32 ("virtio_ring: Support DMA APIs")
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Michael S. Tsirkin <mst@...hat.com>
Cc: stable@...r.kernel.org
Signed-off-by: Tiwei Bie <tiwei.bie@...el.com>
Signed-off-by: Michael S. Tsirkin <mst@...hat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/virtio/virtio_ring.c | 2 --
1 file changed, 2 deletions(-)
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -423,8 +423,6 @@ unmap_release:
i = vq->vring.desc[i].next;
}
- vq->vq.num_free += total_sg;
-
if (indirect)
kfree(desc);
Powered by blists - more mailing lists