Re: [PATCH 3/5] scsi_debug: avoid partial copying PI from prot_sglist to dif_storep

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Akinobu" == Akinobu Mita <akinobu.mita@xxxxxxxxx> writes:

Akinobu> If data integrity support is enabled, prot_verify_write() is
Akinobu> called in response to WRITE commands and it verifies protection
Akinobu> info from prot_sglist by comparing against data sglist, and
Akinobu> copies protection info to dif_storep.

Akinobu> When multiple blocks are transfered by a WRITE command, it
Akinobu> verifies and copies these blocks one by one.  So if it fails to
Akinobu> verify protection info in the middle of blocks, the actual data
Akinobu> transfer to fake_storep isn't proceeded at all although
Akinobu> protection info for some blocks are already copied to
Akinobu> dif_storep.  Therefore, it breaks the data integrity between
Akinobu> fake_storep and dif_storep.

Akinobu> This fixes it by ensuring that copying protection info to
Akinobu> dif_storep is done after all blocks are successfully verified.
Akinobu> Reusing dif_copy_prot() with supporting the opposite direction
Akinobu> simplifies this fix.

Acked-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux