From: James Smart <james.smart@broadcom.com>
To: Colin King <colin.king@canonical.com>,
Dick Kennedy <dick.kennedy@broadcom.com>,
"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: lpfc: fix missing spin_unlock on sql_list_lock
Date: Sat, 4 Mar 2017 09:42:50 -0800 [thread overview]
Message-ID: <4692bdb2-dabb-a9bb-90f3-0678ab0fd26e@broadcom.com> (raw)
In-Reply-To: <20170224143015.6441-1-colin.king@canonical.com>
Looks good. I included it in the lpfc patch set just posted.
-- james
On 2/24/2017 6:30 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> In the case where sglq is null, the current code just returns without
> unlocking the spinlock sql_list_lock. Fix this by breaking out of the
> while loop and the exit path will then unlock and return NULL as was
> the original intention.
>
> Detected by CoverityScan, CID#1411635 ("Missing unlock")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/scsi/lpfc/lpfc_sli.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
> index 1fba5dc..40720bb 100644
> --- a/drivers/scsi/lpfc/lpfc_sli.c
> +++ b/drivers/scsi/lpfc/lpfc_sli.c
> @@ -952,7 +952,7 @@ __lpfc_sli_get_els_sglq(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq)
> start_sglq = sglq;
> while (!found) {
> if (!sglq)
> - return NULL;
> + break;
> if (ndlp && ndlp->active_rrqs_xri_bitmap &&
> test_bit(sglq->sli4_lxritag,
> ndlp->active_rrqs_xri_bitmap)) {
prev parent reply other threads:[~2017-03-04 17:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-24 14:30 Colin King
2017-03-04 17:42 ` 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=4692bdb2-dabb-a9bb-90f3-0678ab0fd26e@broadcom.com \
--to=james.smart@broadcom.com \
--cc=colin.king@canonical.com \
--cc=dick.kennedy@broadcom.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=kernel-janitors@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®