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: <4A5E2762.8050502@emulex.com>
Date:	Wed, 15 Jul 2009 15:00:50 -0400
From:	James Smart <James.Smart@...lex.Com>
To:	Jiri Slaby <jirislaby@...il.com>
CC:	"James.Bottomley@...senPartnership.com" 
	<James.Bottomley@...senPartnership.com>,
	"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] SCSI: lpfc, don't dereference NULL

Thanks Jiri.

-- james s


Acked-By:  James Smart  <james.smart@...lex.com>


Jiri Slaby wrote:
> When kzalloc fails in lpfc_hba_alloc, don't dereference the NULL by
> lpfc_printf_log. Use dev_err instead.
> 
> Signed-off-by: Jiri Slaby <jirislaby@...il.com>
> ---
>  drivers/scsi/lpfc/lpfc_init.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
> index fc67cc6..2452dc9 100644
> --- a/drivers/scsi/lpfc/lpfc_init.c
> +++ b/drivers/scsi/lpfc/lpfc_init.c
> @@ -4130,8 +4130,7 @@ lpfc_hba_alloc(struct pci_dev *pdev)
>  	/* Allocate memory for HBA structure */
>  	phba = kzalloc(sizeof(struct lpfc_hba), GFP_KERNEL);
>  	if (!phba) {
> -		lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
> -				"1417 Failed to allocate hba struct.\n");
> +		dev_err(&pdev->dev, "failed to allocate hba struct\n");
>  		return NULL;
>  	}
>  
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ