[stgt] [PATCH] tgtd: fix leak of task_in_scsi flag

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Mon Mar 17 06:48:32 CET 2014


On Mon, 17 Mar 2014 12:39:01 +0900
Ryusuke Konishi <konishi.ryusuke at lab.ntt.co.jp> wrote:

> When target_mgmt_request() function receives unknown or unsupported
> task management function code or task was already completed for
> ABORT_TASK request, iscsi_tm_execute() and iser_tm_exec() functions
> exit without clearing task_in_scsi flag even though scsi command is
> not in processing.
> 
> This is because the current implementation of target_mgmt_request()
> function returns -EINVAL or -EEXIST for the above cases and
> iscsi_tm_execute() and iser_tm_exec() do not handle these return
> codes.
> 
> This fixes the issue by changing the return value of
> target_mgmt_request() to MGMT_REQ_FAILED for such cases.
> 
> Signed-off-by: Ryusuke Konishi <konishi.ryusuke at lab.ntt.co.jp>
> ---
>  usr/target.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list