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]
Message-Id: <1443021322-48621-4-git-send-email-dsa@cumulusnetworks.com>
Date:	Wed, 23 Sep 2015 08:15:16 -0700
From:	David Ahern <dsa@...ulusnetworks.com>
To:	netdev@...r.kernel.org
Cc:	David Ahern <dsa@...ulusnetworks.com>
Subject: [PATCH net-next 3/9] net: Remove e_nobufs label from ip_route_input_slow

e_nobufs has 1 user. Move setting err to -ENOBUFS for the 1 user and
use the goto out label instead of e_nobufs. Stepping stone patch; next
one moves rth code into a helper function.

Signed-off-by: David Ahern <dsa@...ulusnetworks.com>
---
 net/ipv4/route.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 3c5000db5972..e3b18cc1952f 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1805,8 +1805,10 @@ out:	return err;
 
 	rth = rt_dst_alloc(net->loopback_dev, flags | RTCF_LOCAL, res.type,
 			   IN_DEV_CONF_GET(in_dev, NOPOLICY), false, do_cache);
-	if (!rth)
-		goto e_nobufs;
+	if (!rth) {
+		err = -ENOBUFS;
+		goto out;
+	}
 
 	rth->dst.output= ip_rt_bug;
 #ifdef CONFIG_IP_ROUTE_CLASSID
@@ -1852,10 +1854,6 @@ out:	return err;
 #endif
 	goto out;
 
-e_nobufs:
-	err = -ENOBUFS;
-	goto out;
-
 martian_source:
 	ip_handle_martian_source(dev, in_dev, skb, daddr, saddr);
 	goto out;
-- 
1.9.1

--
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