Thread (1 message) 1 message, 1 author, 2013-03-21

Re: [PATCH -next] openvswitch: fix error return code in ovs_vport_cmd_set()

From: Jesse Gross <hidden>
Date: 2013-03-21 00:06:56

On Wed, Mar 20, 2013 at 9:22 AM, David Miller [off-list ref] wrote:
From: Jesse Gross <redacted>
Date: Wed, 20 Mar 2013 08:57:53 -0700
quoted
On Wed, Mar 20, 2013 at 5:14 AM, Wei Yongjun [off-list ref] wrote:
quoted
From: Wei Yongjun <redacted>

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 <redacted>
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.
That solves the problem here.  I'll take care of it, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help