diff options
| author | Bart Van Assche <[email protected]> | 2019-04-02 12:58:13 -0700 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2019-04-12 20:20:06 -0400 |
| commit | 0ca650c13ba2f53cd3592d1a1d054adcd4164ca4 (patch) | |
| tree | 9b7c794ded0a814cfe933c3aca000ea1d7de0751 /tools/perf/scripts/python/stat-cpi.py | |
| parent | 96e8e26dd8dd8a60ef1d0dc3ef0d952ffa70a39f (diff) | |
scsi: target/iscsi: Handle too large immediate data buffers correctly
Since target_alloc_sgl() and iscsit_allocate_iovecs() allocate buffer space
for se_cmd.data_length bytes and since that number can be smaller than the
iSCSI Expected Data Transfer Length (EDTL), ensure that the iSCSI target
driver does not attempt to receive more bytes than what fits in the receive
buffer. Always receive the full immediate data buffer such that the iSCSI
target driver does not attempt to parse immediate data as an iSCSI PDU.
Note: the current code base only calls iscsit_get_dataout() if the size of
the immediate data buffer does not exceed the buffer size derived from the
SCSI CDB. See also target_cmd_size_check().
Cc: Mike Christie <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: Nicholas Bellinger <[email protected]>
Signed-off-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
0 files changed, 0 insertions, 0 deletions