diff mbox

[v1] ibmvscsis: Fix cleaning up pointers

Message ID 1494348626-62378-1-git-send-email-bryantly@linux.vnet.ibm.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Bryant G. Ly May 9, 2017, 4:50 p.m. UTC
This patch is dependent on:
'commit 25e78531268e ("ibmvscsis: Do not send aborted task response")'
This patch cleans up some pointers after usage.

Signed-off-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com>
Reviewed-by: Michael Cyr <mikecyr@linux.vnet.ibm.com>
Cc: <stable@vger.kernel.org> # v4.8+
---
 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Nicholas A. Bellinger May 10, 2017, 3:45 a.m. UTC | #1
On Tue, 2017-05-09 at 11:50 -0500, Bryant G. Ly wrote:
> This patch is dependent on:
> 'commit 25e78531268e ("ibmvscsis: Do not send aborted task response")'
> This patch cleans up some pointers after usage.
> 
> Signed-off-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com>
> Reviewed-by: Michael Cyr <mikecyr@linux.vnet.ibm.com>
> Cc: <stable@vger.kernel.org> # v4.8+
> ---
>  drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 3 +++
>  1 file changed, 3 insertions(+)

Applied, with a more verbose commit message.

Thanks for splitting this out into an incremental patch.
Bryant G. Ly May 11, 2017, 3:40 p.m. UTC | #2
On 5/9/17 10:45 PM, Nicholas A. Bellinger wrote:

> On Tue, 2017-05-09 at 11:50 -0500, Bryant G. Ly wrote:
>> This patch is dependent on:
>> 'commit 25e78531268e ("ibmvscsis: Do not send aborted task response")'
>> This patch cleans up some pointers after usage.
>>
>> Signed-off-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com>
>> Reviewed-by: Michael Cyr <mikecyr@linux.vnet.ibm.com>
>> Cc: <stable@vger.kernel.org> # v4.8+
>> ---
>>   drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 3 +++
>>   1 file changed, 3 insertions(+)
> Applied, with a more verbose commit message.
>
> Thanks for splitting this out into an incremental patch.
>
No problem, did you end up forgetting it once you reverted Bart's VERIFY/WRITE VERIFY patch?

It seems to be missing from your for-next now.

-Bryant
Nicholas A. Bellinger May 11, 2017, 5:21 p.m. UTC | #3
On Thu, 2017-05-11 at 10:40 -0500, Bryant G. Ly wrote:
> On 5/9/17 10:45 PM, Nicholas A. Bellinger wrote:
> 
> > On Tue, 2017-05-09 at 11:50 -0500, Bryant G. Ly wrote:
> >> This patch is dependent on:
> >> 'commit 25e78531268e ("ibmvscsis: Do not send aborted task response")'
> >> This patch cleans up some pointers after usage.
> >>
> >> Signed-off-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com>
> >> Reviewed-by: Michael Cyr <mikecyr@linux.vnet.ibm.com>
> >> Cc: <stable@vger.kernel.org> # v4.8+
> >> ---
> >>   drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 3 +++
> >>   1 file changed, 3 insertions(+)
> > Applied, with a more verbose commit message.
> >
> > Thanks for splitting this out into an incremental patch.
> >
> No problem, did you end up forgetting it once you reverted Bart's VERIFY/WRITE VERIFY patch?
> 
> It seems to be missing from your for-next now.
> 

Yep, going to include it post -rc1 with your latest patch.
diff mbox

Patch

diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
index d390325..ee64241 100644
--- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
+++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
@@ -1170,6 +1170,8 @@  static struct ibmvscsis_cmd *ibmvscsis_get_free_cmd(struct scsi_info *vscsi)
 		cmd = list_first_entry_or_null(&vscsi->free_cmd,
 					       struct ibmvscsis_cmd, list);
 		if (cmd) {
+			if (cmd->abort_cmd)
+				cmd->abort_cmd = NULL;
 			cmd->flags &= ~(DELAY_SEND);
 			list_del(&cmd->list);
 			cmd->iue = iue;
@@ -1774,6 +1776,7 @@  static void ibmvscsis_send_messages(struct scsi_info *vscsi)
 				if (cmd->abort_cmd) {
 					retry = true;
 					cmd->abort_cmd->flags &= ~(DELAY_SEND);
+					cmd->abort_cmd = NULL;
 				}
 
 				/*