This is a note to let you know that I've just added the patch titled ibmvscsis: Fix srp_transfer_data fail return code to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ibmvscsis-fix-srp_transfer_data-fail-return-code.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 7c9d8d0c41b3e24473ac7648a7fc2d644ccf08ff Mon Sep 17 00:00:00 2001 From: "Bryant G. Ly" <bgly@xxxxxxxxxx> Date: Mon, 9 Jan 2017 10:21:20 -0600 Subject: ibmvscsis: Fix srp_transfer_data fail return code From: Bryant G. Ly <bgly@xxxxxxxxxx> commit 7c9d8d0c41b3e24473ac7648a7fc2d644ccf08ff upstream. If srp_transfer_data fails within ibmvscsis_write_pending, then the most likely scenario is that the client timed out the op and removed the TCE mapping. Thus it will loop forever retrying the op that is pretty much guaranteed to fail forever. A better return code would be EIO instead of EAGAIN. Reported-by: Steven Royer <seroyer@xxxxxxxxxxxxxxxxxx> Tested-by: Steven Royer <seroyer@xxxxxxxxxxxxxxxxxx> Signed-off-by: Bryant G. Ly <bgly@xxxxxxxxxx> Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c @@ -3702,7 +3702,7 @@ static int ibmvscsis_write_pending(struc 1, 1); if (rc) { pr_err("srp_transfer_data() failed: %d\n", rc); - return -EAGAIN; + return -EIO; } /* * We now tell TCM to add this WRITE CDB directly into the TCM storage Patches currently in stable-queue which might be from bgly@xxxxxxxxxx are queue-4.9/ibmvscsis-fix-srp_transfer_data-fail-return-code.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html