diff options
author | Jason Wang <jasowang@redhat.com> | 2014-11-27 18:04:03 +0800 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2015-01-07 14:58:53 -0600 |
commit | b28d7b585a2f58b5eaee523aad1b15713b212031 (patch) | |
tree | 9a2787e366abe00d79ac4645ada2767b376647d3 /block/raw-posix.c | |
parent | cd2f44cc3e75afd059d6a1b8a08ea6892bb8853b (diff) | |
download | qemu-b28d7b585a2f58b5eaee523aad1b15713b212031.tar.gz |
virtio-net: fix unmap leak
virtio_net_handle_ctrl() and other functions that process control vq
request call iov_discard_front() which will shorten the iov. This will
lead unmapping in virtqueue_push() leaks mapping.
Fixes this by keeping the original iov untouched and using a temp variable
in those functions.
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 1417082643-23907-1-git-send-email-jasowang@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 771b6ed37e3aa188a7485560b949a41c6cf174dc)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'block/raw-posix.c')
0 files changed, 0 insertions, 0 deletions