aboutsummaryrefslogtreecommitdiff
path: root/include/target
diff options
context:
space:
mode:
authorGravatar Xiubo Li <lixiubo@cmss.chinamobile.com> 2017-03-27 17:07:41 +0800
committerGravatar Nicholas Bellinger <nab@linux-iscsi.org> 2017-03-30 01:36:53 -0700
commitabe342a5b4b5aa579f6bf40ba73447c699e6b579 (patch)
treeda984f185900edca01b5f58829037db05757a1c9 /include/target
parenttcmu: Fix possible overwrite of t_data_sg's last iov[] (diff)
downloadlinux-abe342a5b4b5aa579f6bf40ba73447c699e6b579.tar.gz
linux-abe342a5b4b5aa579f6bf40ba73447c699e6b579.tar.bz2
linux-abe342a5b4b5aa579f6bf40ba73447c699e6b579.zip
tcmu: Fix wrongly calculating of the base_command_size
The t_data_nents and t_bidi_data_nents are the numbers of the segments, but it couldn't be sure the block size equals to size of the segment. For the worst case, all the blocks are discontiguous and there will need the same number of iovecs, that's to say: blocks == iovs. So here just set the number of iovs to block count needed by tcmu cmd. Tested-by: Ilias Tsitsimpis <iliastsi@arrikto.com> Reviewed-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com> Cc: stable@vger.kernel.org # 3.18+ Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
0 files changed, 0 insertions, 0 deletions