Skip to content
Commit 3fb039d3 authored by Greg Edwards's avatar Greg Edwards Committed by Greg Kroah-Hartman
Browse files

vhost/scsi: truncate T10 PI iov_iter to prot_bytes

commit 4542d623 upstream.

Commands with protection information included were not truncating the
protection iov_iter to the number of protection bytes in the command.
This resulted in vhost_scsi mis-calculating the size of the protection
SGL in vhost_scsi_calc_sgls(), and including both the protection and
data SG entries in the protection SGL.

Fixes: 09b13fa8

 ("vhost/scsi: Add ANY_LAYOUT support in vhost_scsi_handle_vq")
Signed-off-by: default avatarGreg Edwards <gedwards@ddn.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Fixes: 09b13fa8


Cc: stable@vger.kernel.org
Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 543c5297
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment