From: James Smart <jsmart2021@gmail.com>
To: Yang Yingliang <yangyingliang@huawei.com>,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
martin.petersen@oracle.com
Cc: james.smart@broadcom.com, dick.kennedy@broadcom.com
Subject: Re: [PATCH -next] scsi: lpfc: add missing destroy_workqueue() on error path in lpfc_sli4_driver_resource_setup()
Date: Mon, 22 Aug 2022 12:30:35 -0700 [thread overview]
Message-ID: <7cd8ec1b-dd37-756b-0b74-c543fdce1995@gmail.com> (raw)
In-Reply-To: <20220819085049.1906233-1-yangyingliang@huawei.com>
On 8/19/2022 1:50 AM, Yang Yingliang wrote:
> Add the missing destroy_workqueue() before return from
> lpfc_sli4_driver_resource_setup() in error path.
>
> Fixes: 3cee98db2610 ("scsi: lpfc: Fix crash on driver unload in wq free")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/scsi/lpfc/lpfc_init.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
> index c69c5a0979ec..a7bb1620fbe1 100644
> --- a/drivers/scsi/lpfc/lpfc_init.c
> +++ b/drivers/scsi/lpfc/lpfc_init.c
> @@ -8053,7 +8053,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
> /* Allocate device driver memory */
> rc = lpfc_mem_alloc(phba, SGL_ALIGN_SZ);
> if (rc)
> - return -ENOMEM;
> + goto out_destory_workqueue;
>
> /* IF Type 2 ports get initialized now. */
> if (bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) >=
> @@ -8481,6 +8481,9 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
> lpfc_destroy_bootstrap_mbox(phba);
> out_free_mem:
> lpfc_mem_free(phba);
> +out_destory_workqueue:
> + destroy_workqueue(phba->wq);
> + phba->wq = NULL;
> return rc;
> }
>
Looks fine
but label needs spelling error corrected: out_destroy_workqueue
Please resend with this fixed
-- james
prev parent reply other threads:[~2022-08-22 19:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-19 8:50 [PATCH -next] scsi: lpfc: add missing destroy_workqueue() on error path in lpfc_sli4_driver_resource_setup() Yang Yingliang
2022-08-22 19:30 ` James Smart [this message]
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=7cd8ec1b-dd37-756b-0b74-c543fdce1995@gmail.com \
--to=jsmart2021@gmail.com \
--cc=dick.kennedy@broadcom.com \
--cc=james.smart@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=yangyingliang@huawei.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 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).