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:	Wed, 20 Mar 2013 12:22:13 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	jesse@...ira.com
Cc:	weiyj.lk@...il.com, yongjun_wei@...ndmicro.com.cn,
	dev@...nvswitch.org, netdev@...r.kernel.org
Subject: Re: [PATCH -next] openvswitch: fix error return code in
 ovs_vport_cmd_set()

From: Jesse Gross <jesse@...ira.com>
Date: Wed, 20 Mar 2013 08:57:53 -0700

> On Wed, Mar 20, 2013 at 5:14 AM, Wei Yongjun <weiyj.lk@...il.com> wrote:
>> From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
>>
>> Fix to return a negative error code from the error handling
>> case instead of 0, as returned elsewhere in this function.
>>
>> Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
> 
> This isn't right because at this point in the function the change has
> already been made, only the notification allocation failed.  Therefore
> we don't want to return an error since the caller will assume that
> nothing has changed; instead an error is set on the Netlink socket.

Then the way to fix this is to allocate the netlink SKB first, before
any config changes occur, then pass that SKB into ovs_vport_cmd_build_info.

We can still get errors, for -EMSGSIZE situations, but I'd say that'd
be an implementation bug that should be logged.  If we aren't allocating
large enough SKBs for the netlink reply, that's really an internal
error.
--
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