All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kashyap Desai <kashyap.desai@broadcom.com>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	"James E . J . Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH -next] scsi: mpi3mr: Fix missing unlock on error
Date: Wed, 16 Jun 2021 19:16:24 +0530	[thread overview]
Message-ID: <CAHsXFKGkRDdqc5kNozCrw=7CgORAp0_jyt+-7FW=n62r2xmvFA@mail.gmail.com> (raw)
In-Reply-To: <20210603152803.717505-1-yangyingliang@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 1515 bytes --]

> Goto unlock path before return from function
> in the error handling case.
>
> Fixes: c9566231cfaf ("scsi: mpi3mr: Create operational request and reply queue pair")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  drivers/scsi/mpi3mr/mpi3mr_fw.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
> index dbf116414855..8aea1c2ae712 100644
> --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
> +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
> @@ -1583,7 +1583,7 @@ static int mpi3mr_create_op_reply_q(struct mpi3mr_ioc *mrioc, u16 qidx)
>         if (mrioc->init_cmds.state & MPI3MR_CMD_PENDING) {
>                 retval = -1;
>                 ioc_err(mrioc, "CreateRepQ: Init command is in use\n");
> -               goto out;
> +               goto out_unlock;
>         }
>         mrioc->init_cmds.state = MPI3MR_CMD_PENDING;
>         mrioc->init_cmds.is_waiting = 1;
> @@ -1692,7 +1692,7 @@ static int mpi3mr_create_op_req_q(struct mpi3mr_ioc *mrioc, u16 idx,
>         if (mrioc->init_cmds.state & MPI3MR_CMD_PENDING) {
>                 retval = -1;
>                 ioc_err(mrioc, "CreateReqQ: Init command is in use\n");
> -               goto out;
> +               goto out_unlock;
>         }
>         mrioc->init_cmds.state = MPI3MR_CMD_PENDING;
>         mrioc->init_cmds.is_waiting = 1;

Acked-by: Kashyap Desai <kashyap.desai@broadcom.com>
> --
> 2.25.1
>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4212 bytes --]

  reply	other threads:[~2021-06-16 13:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03 15:28 [PATCH -next] scsi: mpi3mr: Fix missing unlock on error Yang Yingliang
2021-06-16 13:46 ` Kashyap Desai [this message]
2021-06-19  2:02 ` 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='CAHsXFKGkRDdqc5kNozCrw=7CgORAp0_jyt+-7FW=n62r2xmvFA@mail.gmail.com' \
    --to=kashyap.desai@broadcom.com \
    --cc=jejb@linux.ibm.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 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.