Re: [RFC] Simlify dif_verify routines and fixup fileio protection information code.

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

 



On 4/16/2015 6:58 PM, Sagi Grimberg wrote:
On 4/16/2015 4:46 PM, Akinobu Mita wrote:
2015-04-16 17:52 GMT+09:00 Sagi Grimberg <sagig@xxxxxxxxxxxxxxxxxx>:
On 4/15/2015 7:10 PM, Martin K. Petersen wrote:

"Sagi" == Sagi Grimberg <sagig@xxxxxxxxxxxxxxxxxx> writes:


By the commit 436f4a0a ("loopback: Add fabric_prot_type attribute
support"), When WRITE_SAME command with WRPROTECT=0 is executed,
sbc_dif_generate() is called but cmd->t_prot_sg is NULL as block
layer didn't allocate it for WRITE_SAME.


Sagi> Actually this is a bug. Why didn't the initiator allocate
Sagi> integrity meta-data for WRITE_SAME? Looking at the code it looks
Sagi> like it should.

We don't issue WRITE SAME with PI so there is no prot SGL.


Is there a specific reason why we don't?

It is not only for the WRITE SAME requests from block device but
also for READ/WRITE with PROTECT=0 requests by SG_IO.


This is specific to loopback which is using target_submit_cmd_map_sgls()
Other fabrics would allocate sgls per IO and the core would allocate
protection SGLs as well.


By "This" I meant the NULL deref you are witnessing in for wrprotect=0.
--
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