diff options
author | Jason Wang <jasowang@redhat.com> | 2014-11-27 18:04:03 +0800 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-11-28 10:29:20 +0000 |
commit | 771b6ed37e3aa188a7485560b949a41c6cf174dc (patch) | |
tree | acf3136ca16ec7df6807947cb7f38569a1e6933e /hw/i2c/smbus.c | |
parent | 4cae4d5acaea23f3def84c8dc67ef5106323e5cb (diff) |
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>
Diffstat (limited to 'hw/i2c/smbus.c')
0 files changed, 0 insertions, 0 deletions