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:	Thu, 04 Dec 2008 14:02:46 +0100
From:	Patrick McHardy <kaber@...sh.net>
To:	Inaky Perez-Gonzalez <inaky@...ux.intel.com>
CC:	netdev@...r.kernel.org, wimax@...uxwimax.org
Subject: Re: [PATCH 07/39] wimax: generic WiMAX device management (registration,
 deregistration, etc)

Inaky Perez-Gonzalez wrote:
> On Thursday 27 November 2008, Patrick McHardy wrote:
>>>
>>> +	result = nla_put_u64(reply_skb, WIMAX_GNL_RESULT_CODE, (u64) code_s64);
>>> +	if (result < 0)
>>> +		dev_err(dev, "Error putting attribute: %d\n", result);
>> This is not how netlink protocols should treat errors.
>> It should return -ENOSPC (everywhere else also of course).
> 
> Other than the fact that this function is gone after Johannes comments
> (so for everywhere else), wouldn't returning the -EMSGSIZE nla_put_*() 
> returns enough?
> 
> I changed all of them to be something like:
> 
> result = nla_put*();
> if (result < 0)
> 	goto error path /* release skb/msg, return result */

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