diff options
| author | Akinobu Mita <[email protected]> | 2015-05-01 15:23:49 +0900 |
|---|---|---|
| committer | Nicholas Bellinger <[email protected]> | 2015-05-30 22:42:24 -0700 |
| commit | 5835812f13e56483f2c4907664bb43b0a78546b6 (patch) | |
| tree | 229ed3b47ab6f80936c063b5b92bfe6bf7c736e5 /tools/perf/scripts/python | |
| parent | 57636388af32c2c7db3919e8d53f4979b7c7c307 (diff) | |
target: ensure se_cmd->t_prot_sg is allocated when required
Even if the device backend is initialized with protection info is
enabled, some requests don't have the protection info attached for
WRITE SAME command issued by block device helpers, WRITE command with
WRPROTECT=0 by SG_IO ioctl, etc.
So when TCM loopback fabric module is used, se_cmd->t_prot_sg is NULL
for these requests and performing WRITE_INSERT of PI using software
emulation by sbc_dif_generate() causes kernel crash.
To fix this, introduce SCF_PASSTHROUGH_PROT_SG_TO_MEM_NOALLOC for
se_cmd_flags, which is used to determine that se_cmd->t_prot_sg needs
to be allocated or use pre-allocated protection information by scsi
mid-layer.
Signed-off-by: Akinobu Mita <[email protected]>
Cc: Nicholas Bellinger <[email protected]>
Cc: Sagi Grimberg <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Nicholas Bellinger <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions