]> www.infradead.org Git - users/jedix/linux-maple.git/commit
vhost/scsi: fix reuse of &vq->iov[out] in response
authorBenjamin Coddington <bcodding@redhat.com>
Mon, 6 Jun 2016 22:07:59 +0000 (18:07 -0400)
committerBrian Maly <brian.maly@oracle.com>
Fri, 4 May 2018 17:54:37 +0000 (13:54 -0400)
commit84d0b91c8096a963930ff4701fee61f99ee22c3b
tree25e9736a63540d155ff8405ee652641ab48fc8f2
parent51e39a41888f0c1968b35f57a47439973642f96b
vhost/scsi: fix reuse of &vq->iov[out] in response

The address of the iovec &vq->iov[out] is not guaranteed to contain the scsi
command's response iovec throughout the lifetime of the command.  Rather, it
is more likely to contain an iovec from an immediately following command
after looping back around to vhost_get_vq_desc().  Pass along the iovec
entirely instead.

Fixes: 79c14141a487 ("vhost/scsi: Convert completion path to use copy_to_iter")
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit a77ec83a57890240c546df00ca5df1cdeedb1cc3)

Orabug: 27928330

Signed-off-by: Gayatri Vasudevan <gayatri.vasudevan@oracle.com>
Reviewed-by: Mridula Shastry <mridula.c.shastry@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/vhost/scsi.c