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>] [day] [month] [year] [list]
Date:   Mon, 28 Oct 2019 10:42:33 -0700
From:   James Smart <james.smart@...adcom.com>
To:     Saurav Girepunje <saurav.girepunje@...il.com>,
        dick.kennedy@...adcom.com, jejb@...ux.ibm.com,
        martin.petersen@...cle.com, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     saurav.girepunje@...mail.com
Subject: Re: [PATCH] scsi: lpfc: Fix NULL check before mempool_destroy is not
 needed

On 10/26/2019 12:47 PM, Saurav Girepunje wrote:
> mempool_destroy has taken null pointer check into account.
> so remove the redundant check.
>
> Signed-off-by: Saurav Girepunje <saurav.girepunje@...il.com>
> ---
>   drivers/scsi/lpfc/lpfc_init.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
> index e91377a4cafe..f620ecae3428 100644
> --- a/drivers/scsi/lpfc/lpfc_init.c
> +++ b/drivers/scsi/lpfc/lpfc_init.c
> @@ -13346,8 +13346,7 @@ lpfc_sli4_oas_verify(struct lpfc_hba *phba)
>   		phba->cfg_fof = 1;
>   	} else {
>   		phba->cfg_fof = 0;
> -		if (phba->device_data_mem_pool)
> -			mempool_destroy(phba->device_data_mem_pool);
> +		mempool_destroy(phba->device_data_mem_pool);
>   		phba->device_data_mem_pool = NULL;
>   	}
>   
Looks fine.

Thanks

Reviewed-by:  James Smart <james.smart@...adcom.com>

-- james

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ