lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4692bdb2-dabb-a9bb-90f3-0678ab0fd26e@broadcom.com>
Date:   Sat, 4 Mar 2017 09:42:50 -0800
From:   James Smart <james.smart@...adcom.com>
To:     Colin King <colin.king@...onical.com>,
        Dick Kennedy <dick.kennedy@...adcom.com>,
        "James E . J . Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: lpfc: fix missing spin_unlock on sql_list_lock

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@...onical.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@...onical.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)) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ