On 05/05/2017 12:50 AM, Bart Van Assche wrote: > From __target_execute_cmd() (simplified): > > ret = cmd->execute_cmd(cmd); > if (ret != 0) > transport_generic_request_failure(cmd, ret); > > From sbc_execute_rw(): > > return ops->execute_rw(cmd, cmd->t_data_sg, cmd->t_data_nents, > cmd->data_direction); > > This means that sbc_ops.execute_rw() must either return a non-zero > value or call target_complete_cmd() and return zero or command > execution stalls. Make sure that fd_execute_rw() calls > target_complete_cmd() even for zero-length commands. > > Fixes: commit c66ac9db8d4a ("[SCSI] target: Add LIO target core v4.0.0-rc6") > Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx> > Cc: Hannes Reinecke <hare@xxxxxxxx> > Cc: Christoph Hellwig <hch@xxxxxx> > Cc: Andy Grover <agrover@xxxxxxxxxx> > Cc: David Disseldorp <ddiss@xxxxxxx> > Cc: <stable@xxxxxxxxxxxxxxx> > --- > drivers/target/target_core_file.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > Reviewed-by: Hannes Reinecke <hare@xxxxxxxx> Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@xxxxxxxx +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)