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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 3 Apr 2023 12:16:16 +0300
From:   Dan Carpenter <error27@...il.com>
To:     lishuchang@...t.edu.cn
Cc:     James Smart <james.smart@...adcom.com>,
        Dick Kennedy <dick.kennedy@...adcom.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        hust-os-kernel-patches@...glegroups.com,
        Dongliang Mu <dzm91@...t.edu.cn>, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: lpfc: fix ioremap issues in
 'lpfc_sli4_pci_mem_setup'

On Mon, Apr 03, 2023 at 03:48:21PM +0800, lishuchang@...t.edu.cn wrote:
> @@ -12069,9 +12069,11 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba *phba)
>  	return 0;
>  
>  out_iounmap_all:
> -	iounmap(phba->sli4_hba.drbl_regs_memmap_p);
> +	if (!phba->sli4_hba.drbl_regs_memmap_p)
> +		iounmap(phba->sli4_hba.drbl_regs_memmap_p);

The test is reversed still.

If you make a mistake, you should write a static checker warning so that
you never make the same mistake again.  ;)  See attached.


>  out_iounmap_ctrl:
> -	iounmap(phba->sli4_hba.ctrl_regs_memmap_p);
> +	if (!phba->sli4_hba.ctrl_regs_memmap_p)

Also reversed.

> +		iounmap(phba->sli4_hba.ctrl_regs_memmap_p);
>  out_iounmap_conf:
>  	iounmap(phba->sli4_hba.conf_regs_memmap_p);

regards,
dan carpenter



View attachment "check_passing_possible_null.c" of type "text/x-csrc" (1315 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ