mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
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/[email protected] Reviewed-by: Roman Bolshakov <[email protected]> Reviewed-by: Bodo Stroesser <[email protected]> Signed-off-by: Aleksandr Miloserdov <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>