Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1350070
| From | Jiri Slaby <jslaby@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.12 024/116] rtnl: RTM_GETNETCONF: fix wrong return value |
| Date | 2016-03-04 10:50 +0100 |
| Message-ID | <r8UwW-4Id-3@gated-at.bofh.it> (permalink) |
| References | <r8TUd-4rg-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Anton Protopopov <a.s.protopopov@gmail.com> 3.12-stable review patch. If anyone has any objections, please let me know. =============== [ Upstream commit a97eb33ff225f34a8124774b3373fd244f0e83ce ] An error response from a RTM_GETNETCONF request can return the positive error value EINVAL in the struct nlmsgerr that can mislead userspace. Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com> Acked-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jiri Slaby <jslaby@suse.cz> --- net/ipv4/devinet.c | 2 +- net/ipv6/addrconf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index f4b34d8f92fe..68447109000f 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -1785,7 +1785,7 @@ static int inet_netconf_get_devconf(struct sk_buff *in_skb, if (err < 0) goto errout; - err = EINVAL; + err = -EINVAL; if (!tb[NETCONFA_IFINDEX]) goto errout; diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 6c629ffb8756..bbf35875e4ef 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -528,7 +528,7 @@ static int inet6_netconf_get_devconf(struct sk_buff *in_skb, if (err < 0) goto errout; - err = EINVAL; + err = -EINVAL; if (!tb[NETCONFA_IFINDEX]) goto errout; -- 2.7.2
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 3.12 024/116] rtnl: RTM_GETNETCONF: fix wrong return value Jiri Slaby <jslaby@suse.cz> - 2016-03-04 10:50 +0100
csiph-web