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]
Date:	Tue, 29 Oct 2013 16:02:31 -0700
From:	Joe Perches <joe@...ches.com>
To:	David Miller <davem@...emloft.net>
Cc:	jeffrey.t.kirsher@...el.com, yongjun_wei@...ndmicro.com.cn,
	netdev@...r.kernel.org, gospo@...hat.com, sassmann@...hat.com
Subject: Re: [net-next 11/11] i40e: fix error return code in i40e_probe()

On Tue, 2013-10-29 at 18:57 -0400, David Miller wrote:
> From: Joe Perches <joe@...ches.com>
> > On Tue, 2013-10-29 at 05:02 -0700, Jeff Kirsher wrote:
> >> Fix to return -ENOMEM in the memory alloc error handling
> >> case instead of 0, as done elsewhere in this function.
> > trivial note:
> >> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> > []
> >> @@ -7204,8 +7204,10 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> >>  	 */
> >>  	len = sizeof(struct i40e_vsi *) * pf->hw.func_caps.num_vsis;
> >>  	pf->vsi = kzalloc(len, GFP_KERNEL);
> >> -	if (!pf->vsi)
> >> +	if (!pf->vsi) {
> >> +		err = -ENOMEM;
> >>  		goto err_switch_setup;
> >> +	}
> > 
> > This might be better as:
> > 
> > 	pf->vsi = kcalloc(pf->hw.func_caps.num_vsis, struct i40e_vsi *),
> > 			  GFP_KERNEL);
> > 
> > and removing the now unused u32 len; declaration.
> 
> Agreed but that's a follow-on patch rather than something to block this
> pull request.

I don't think any trivial note should block anything
and if a submitter wants to update it later that's
just fine.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ