linux-stable/include/target
Aleksandr Miloserdov 1c73e0c5e5 scsi: target: core: Add cmd length set before cmd complete
TCM doesn't properly handle underflow case for service actions. One way to
prevent it is to always complete command with
target_complete_cmd_with_length(), however it requires access to data_sg,
which is not always available.

This change introduces target_set_cmd_data_length() function which allows
to set command data length before completing it.

Link: https://lore.kernel.org/r/20210209072202.41154-2-a.miloserdov@yadro.com
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Bodo Stroesser <bostroesser@gmail.com>
Signed-off-by: Aleksandr Miloserdov <a.miloserdov@yadro.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-02-22 22:21:29 -05:00
..
iscsi scsi: target: Make iscsit_register_transport() return void 2020-08-04 20:56:56 -04:00
target_core_backend.h scsi: target: core: Add cmd length set before cmd complete 2021-02-22 22:21:29 -05:00
target_core_base.h scsi: target: core: Change ASCQ for residual write 2021-01-26 23:12:18 -05:00
target_core_fabric.h scsi: target: Drop sess_cmd_lock from I/O path 2020-11-04 22:39:37 -05:00