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]
Message-ID: <56867607.4090907@users.sourceforge.net>
Date:	Fri, 1 Jan 2016 13:50:15 +0100
From:	SF Markus Elfring <elfring@...rs.sourceforge.net>
To:	Julia Lawall <julia.lawall@...6.fr>
Cc:	netdev@...r.kernel.org,
	Claudiu Manoil <claudiu.manoil@...escale.com>,
	LKML <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 1/3] net-gianfar: Less function calls in
 gfar_ethflow_to_filer_table() after error detection

>> +++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
>> @@ -778,11 +778,13 @@ static int gfar_ethflow_to_filer_table(struct gfar_private *priv, u64 ethflow,
>>  
>>  	local_rqfpr = kmalloc_array(MAX_FILER_IDX + 1, sizeof(unsigned int),
>>  				    GFP_KERNEL);
>> +	if (!local_rqfpr)
>> +		return 1;
> 
> Why return 1?  Previously 0 was returned.

You are right. - Unfortunately, I made a mistake at this place
of my update suggestion.


> Normally, one returns -ENOMEM for this case, but it looks like this 
> function is returning 0 on failure.

Should a symbol like "false" be used instead of such a special number?

Regards,
Markus

--
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