summaryrefslogtreecommitdiff
path: root/drivers/target/iscsi
diff options
context:
space:
mode:
authorRoman Bolshakov <r.bolshakov@yadro.com>2019-07-02 22:16:38 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2019-07-02 23:35:52 +0300
commit5676234f20fef02f6ca9bd66c63a8860fce62645 (patch)
tree3a70919db974650dc2538ea93252758af082e385 /drivers/target/iscsi
parent240b4cc8fd5db138b675297d4226ec46594d9b3b (diff)
downloadlinux-5676234f20fef02f6ca9bd66c63a8860fce62645.tar.xz
scsi: target/iblock: Fix overrun in WRITE SAME emulation
WRITE SAME corrupts data on the block device behind iblock if the command is emulated. The emulation code issues (M - 1) * N times more bios than requested, where M is the number of 512 blocks per real block size and N is the NUMBER OF LOGICAL BLOCKS specified in WRITE SAME command. So, for a device with 4k blocks, 7 * N more LBAs gets written after the requested range. The issue happens because the number of 512 byte sectors to be written is decreased one by one while the real bios are typically from 1 to 8 512 byte sectors per bio. Fixes: c66ac9db8d4a ("[SCSI] target: Add LIO target core v4.0.0-rc6") Cc: <stable@vger.kernel.org> Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target/iscsi')
0 files changed, 0 insertions, 0 deletions