All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Linux SCSI Mailinglist <linux-scsi@vger.kernel.org>,
	Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
	Dick Kennedy <dick.kennedy@broadcom.com>
Subject: Re: [PATCH] Set elsiocb contexts to NULL after freeing it
Date: Fri, 13 Jan 2017 16:21:38 +0100	[thread overview]
Message-ID: <20170113152138.GC3409@linux-x5ow.site> (raw)
In-Reply-To: <20170110110554.13770-1-jthumshirn@suse.de>

[+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

  reply	other threads:[~2017-01-13 15:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 11:05 [PATCH] Set elsiocb contexts to NULL after freeing it Johannes Thumshirn
2017-01-13 15:21 ` Johannes Thumshirn [this message]
2017-01-17 19:02   ` Martin K. Petersen
2017-01-20 21:51 ` Martin K. Petersen
2017-01-20 21:54   ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170113152138.GC3409@linux-x5ow.site \
    --to=jthumshirn@suse.de \
    --cc=dick.kennedy@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.