linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Set elsiocb contexts to NULL after freeing it
@ 2017-01-10 11:05 Johannes Thumshirn
  2017-01-13 15:21 ` Johannes Thumshirn
  2017-01-20 21:51 ` Martin K. Petersen
  0 siblings, 2 replies; 5+ messages in thread
From: Johannes Thumshirn @ 2017-01-10 11:05 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Linux SCSI Mailinglist, Linux Kernel Mailinglist, Dick Kennedy,
	Johannes Thumshirn

Set the elsiocb contexts to NULL after freeing as others depend on it.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/scsi/lpfc/lpfc_els.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 236e4e5..7b6bd8e 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -3590,12 +3590,14 @@ lpfc_els_free_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *elsiocb)
 		} else {
 			buf_ptr1 = (struct lpfc_dmabuf *) elsiocb->context2;
 			lpfc_els_free_data(phba, buf_ptr1);
+			elsiocb->context2 = NULL;
 		}
 	}
 
 	if (elsiocb->context3) {
 		buf_ptr = (struct lpfc_dmabuf *) elsiocb->context3;
 		lpfc_els_free_bpl(phba, buf_ptr);
+		elsiocb->context3 = NULL;
 	}
 	lpfc_sli_release_iocbq(phba, elsiocb);
 	return 0;
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Set elsiocb contexts to NULL after freeing it
  2017-01-10 11:05 [PATCH] Set elsiocb contexts to NULL after freeing it Johannes Thumshirn
@ 2017-01-13 15:21 ` Johannes Thumshirn
  2017-01-17 19:02   ` Martin K. Petersen
  2017-01-20 21:51 ` Martin K. Petersen
  1 sibling, 1 reply; 5+ messages in thread
From: Johannes Thumshirn @ 2017-01-13 15:21 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Linux SCSI Mailinglist, Linux Kernel Mailinglist, Dick Kennedy

[+Cc James S. I'm sorry]

On Tue, Jan 10, 2017 at 12:05:54PM +0100, Johannes Thumshirn wrote:
> Set the elsiocb contexts to NULL after freeing as others depend on it.
> 
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
> ---
>  drivers/scsi/lpfc/lpfc_els.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
> index 236e4e5..7b6bd8e 100644
> --- a/drivers/scsi/lpfc/lpfc_els.c
> +++ b/drivers/scsi/lpfc/lpfc_els.c
> @@ -3590,12 +3590,14 @@ lpfc_els_free_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *elsiocb)
>  		} else {
>  			buf_ptr1 = (struct lpfc_dmabuf *) elsiocb->context2;
>  			lpfc_els_free_data(phba, buf_ptr1);
> +			elsiocb->context2 = NULL;
>  		}
>  	}
>  
>  	if (elsiocb->context3) {
>  		buf_ptr = (struct lpfc_dmabuf *) elsiocb->context3;
>  		lpfc_els_free_bpl(phba, buf_ptr);
> +		elsiocb->context3 = NULL;
>  	}
>  	lpfc_sli_release_iocbq(phba, elsiocb);
>  	return 0;

Dick, James, any comments? I'd really like to get this in soon as it solves
customer issues.

Byte,
	Johannes

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Set elsiocb contexts to NULL after freeing it
  2017-01-13 15:21 ` Johannes Thumshirn
@ 2017-01-17 19:02   ` Martin K. Petersen
  0 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2017-01-17 19:02 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: Martin K . Petersen, Linux SCSI Mailinglist,
	Linux Kernel Mailinglist, Dick Kennedy

>>>>> "Johannes" == Johannes Thumshirn <jthumshirn@suse.de> writes:

Johannes> Dick, James, any comments? I'd really like to get this in soon
Johannes> as it solves customer issues.

Ping?

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Set elsiocb contexts to NULL after freeing it
  2017-01-10 11:05 [PATCH] Set elsiocb contexts to NULL after freeing it Johannes Thumshirn
  2017-01-13 15:21 ` Johannes Thumshirn
@ 2017-01-20 21:51 ` Martin K. Petersen
  2017-01-20 21:54   ` Martin K. Petersen
  1 sibling, 1 reply; 5+ messages in thread
From: Martin K. Petersen @ 2017-01-20 21:51 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: Martin K . Petersen, Linux SCSI Mailinglist,
	Linux Kernel Mailinglist, Dick Kennedy

>>>>> "Johannes" == Johannes Thumshirn <jthumshirn@suse.de> writes:

Johannes> Set the elsiocb contexts to NULL after freeing as others
Johannes> depend on it.

Applied to 4.11/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Set elsiocb contexts to NULL after freeing it
  2017-01-20 21:51 ` Martin K. Petersen
@ 2017-01-20 21:54   ` Martin K. Petersen
  0 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2017-01-20 21:54 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Johannes Thumshirn, Linux SCSI Mailinglist,
	Linux Kernel Mailinglist, Dick Kennedy

>>>>> "Martin" == Martin K Petersen <martin.petersen@oracle.com> writes:

>>>>> "Johannes" == Johannes Thumshirn <jthumshirn@suse.de> writes:
Johannes> Set the elsiocb contexts to NULL after freeing as others
Johannes> depend on it.

Martin> Applied to 4.11/scsi-queue.

Replied to the wrong mail, sorry. This fix is already upstream.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-20 21:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-10 11:05 [PATCH] Set elsiocb contexts to NULL after freeing it Johannes Thumshirn
2017-01-13 15:21 ` Johannes Thumshirn
2017-01-17 19:02   ` Martin K. Petersen
2017-01-20 21:51 ` Martin K. Petersen
2017-01-20 21:54   ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).