Skip to content
Commit 4542d623 authored by Greg Edwards's avatar Greg Edwards Committed by Michael S. Tsirkin
Browse files

vhost/scsi: truncate T10 PI iov_iter to prot_bytes



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>
parent 2e991629
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment