Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1347503 > unrolled thread

[PATCH 4.4 044/342] rtnl: RTM_GETNETCONF: fix wrong return value

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-03-02 02:40 +0100
Last post2016-03-02 02:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.4 044/342] rtnl: RTM_GETNETCONF: fix wrong return value Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 02:40 +0100

#1347503 — [PATCH 4.4 044/342] rtnl: RTM_GETNETCONF: fix wrong return value

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-03-02 02:40 +0100
Subject[PATCH 4.4 044/342] rtnl: RTM_GETNETCONF: fix wrong return value
Message-ID<r83VF-sE-25@gated-at.bofh.it>
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Anton Protopopov <a.s.protopopov@gmail.com>

[ 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ipv4/devinet.c  |    2 +-
 net/ipv6/addrconf.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1847,7 +1847,7 @@ static int inet_netconf_get_devconf(stru
 	if (err < 0)
 		goto errout;
 
-	err = EINVAL;
+	err = -EINVAL;
 	if (!tb[NETCONFA_IFINDEX])
 		goto errout;
 
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -583,7 +583,7 @@ static int inet6_netconf_get_devconf(str
 	if (err < 0)
 		goto errout;
 
-	err = EINVAL;
+	err = -EINVAL;
 	if (!tb[NETCONFA_IFINDEX])
 		goto errout;

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web