Re: [PATCH net-next] lwtunnel: fix error path in lwtunnel_fill_encap()

2017-04-30 Thread David Miller
From: Dan Carpenter Date: Fri, 28 Apr 2017 16:03:48 +0300 > We recently added a check to see if nla_nest_start() fails. There are > two issues with that. First, if it fails then I don't think we should > call nla_nest_cancel(). Second, it's slightly convoluted but the > current code returns su

Re: [PATCH net-next] lwtunnel: fix error path in lwtunnel_fill_encap()

2017-04-29 Thread David Ahern
On 4/28/17 7:03 AM, Dan Carpenter wrote: > We recently added a check to see if nla_nest_start() fails. There are > two issues with that. First, if it fails then I don't think we should > call nla_nest_cancel(). Second, it's slightly convoluted but the > current code returns success but we should

[PATCH net-next] lwtunnel: fix error path in lwtunnel_fill_encap()

2017-04-28 Thread Dan Carpenter
We recently added a check to see if nla_nest_start() fails. There are two issues with that. First, if it fails then I don't think we should call nla_nest_cancel(). Second, it's slightly convoluted but the current code returns success but we should return -EMSGSIZE instead. Fixes: a50fe0ffd76f (