aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/neighbour.c8
-rw-r--r--net/core/rtnetlink.c2
-rw-r--r--net/decnet/dn_route.c5
-rw-r--r--net/ipv4/devinet.c6
-rw-r--r--net/ipv4/route.c2
-rw-r--r--net/ipv6/addrconf.c2
6 files changed, 11 insertions, 14 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index d36d564f149f..70fe9e10ac86 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2128,7 +2128,7 @@ static int neightbl_dump_info(struct sk_buff *skb, struct netlink_callback *cb)
2128 2128
2129 if (neightbl_fill_info(skb, tbl, NETLINK_CB(cb->skb).portid, 2129 if (neightbl_fill_info(skb, tbl, NETLINK_CB(cb->skb).portid,
2130 cb->nlh->nlmsg_seq, RTM_NEWNEIGHTBL, 2130 cb->nlh->nlmsg_seq, RTM_NEWNEIGHTBL,
2131 NLM_F_MULTI) <= 0) 2131 NLM_F_MULTI) < 0)
2132 break; 2132 break;
2133 2133
2134 nidx = 0; 2134 nidx = 0;
@@ -2144,7 +2144,7 @@ static int neightbl_dump_info(struct sk_buff *skb, struct netlink_callback *cb)
2144 NETLINK_CB(cb->skb).portid, 2144 NETLINK_CB(cb->skb).portid,
2145 cb->nlh->nlmsg_seq, 2145 cb->nlh->nlmsg_seq,
2146 RTM_NEWNEIGHTBL, 2146 RTM_NEWNEIGHTBL,
2147 NLM_F_MULTI) <= 0) 2147 NLM_F_MULTI) < 0)
2148 goto out; 2148 goto out;
2149 next: 2149 next:
2150 nidx++; 2150 nidx++;
@@ -2274,7 +2274,7 @@ static int neigh_dump_table(struct neigh_table *tbl, struct sk_buff *skb,
2274 if (neigh_fill_info(skb, n, NETLINK_CB(cb->skb).portid, 2274 if (neigh_fill_info(skb, n, NETLINK_CB(cb->skb).portid,
2275 cb->nlh->nlmsg_seq, 2275 cb->nlh->nlmsg_seq,
2276 RTM_NEWNEIGH, 2276 RTM_NEWNEIGH,
2277 NLM_F_MULTI) <= 0) { 2277 NLM_F_MULTI) < 0) {
2278 rc = -1; 2278 rc = -1;
2279 goto out; 2279 goto out;
2280 } 2280 }
@@ -2311,7 +2311,7 @@ static int pneigh_dump_table(struct neigh_table *tbl, struct sk_buff *skb,
2311 if (pneigh_fill_info(skb, n, NETLINK_CB(cb->skb).portid, 2311 if (pneigh_fill_info(skb, n, NETLINK_CB(cb->skb).portid,
2312 cb->nlh->nlmsg_seq, 2312 cb->nlh->nlmsg_seq,
2313 RTM_NEWNEIGH, 2313 RTM_NEWNEIGH,
2314 NLM_F_MULTI, tbl) <= 0) { 2314 NLM_F_MULTI, tbl) < 0) {
2315 read_unlock_bh(&tbl->lock); 2315 read_unlock_bh(&tbl->lock);
2316 rc = -1; 2316 rc = -1;
2317 goto out; 2317 goto out;
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index e13b9dbdf154..0e26b9f66cad 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1327,7 +1327,7 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
1327 */ 1327 */
1328 WARN_ON((err == -EMSGSIZE) && (skb->len == 0)); 1328 WARN_ON((err == -EMSGSIZE) && (skb->len == 0));
1329 1329
1330 if (err <= 0) 1330 if (err < 0)
1331 goto out; 1331 goto out;
1332 1332
1333 nl_dump_check_consistent(cb, nlmsg_hdr(skb)); 1333 nl_dump_check_consistent(cb, nlmsg_hdr(skb));
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 812e5e6e88fb..1d7c1256e845 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1710,9 +1710,6 @@ static int dn_cache_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh)
1710 rt->rt_flags |= RTCF_NOTIFY; 1710 rt->rt_flags |= RTCF_NOTIFY;
1711 1711
1712 err = dn_rt_fill_info(skb, NETLINK_CB(in_skb).portid, nlh->nlmsg_seq, RTM_NEWROUTE, 0, 0); 1712 err = dn_rt_fill_info(skb, NETLINK_CB(in_skb).portid, nlh->nlmsg_seq, RTM_NEWROUTE, 0, 0);
1713
1714 if (err == 0)
1715 goto out_free;
1716 if (err < 0) { 1713 if (err < 0) {
1717 err = -EMSGSIZE; 1714 err = -EMSGSIZE;
1718 goto out_free; 1715 goto out_free;
@@ -1763,7 +1760,7 @@ int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb)
1763 skb_dst_set(skb, dst_clone(&rt->dst)); 1760 skb_dst_set(skb, dst_clone(&rt->dst));
1764 if (dn_rt_fill_info(skb, NETLINK_CB(cb->skb).portid, 1761 if (dn_rt_fill_info(skb, NETLINK_CB(cb->skb).portid,
1765 cb->nlh->nlmsg_seq, RTM_NEWROUTE, 1762 cb->nlh->nlmsg_seq, RTM_NEWROUTE,
1766 1, NLM_F_MULTI) <= 0) { 1763 1, NLM_F_MULTI) < 0) {
1767 skb_dst_drop(skb); 1764 skb_dst_drop(skb);
1768 rcu_read_unlock_bh(); 1765 rcu_read_unlock_bh();
1769 goto done; 1766 goto done;
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 5f344eb3fc25..59ebe16d06fc 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1883,7 +1883,7 @@ static int inet_netconf_dump_devconf(struct sk_buff *skb,
1883 cb->nlh->nlmsg_seq, 1883 cb->nlh->nlmsg_seq,
1884 RTM_NEWNETCONF, 1884 RTM_NEWNETCONF,
1885 NLM_F_MULTI, 1885 NLM_F_MULTI,
1886 -1) <= 0) { 1886 -1) < 0) {
1887 rcu_read_unlock(); 1887 rcu_read_unlock();
1888 goto done; 1888 goto done;
1889 } 1889 }
@@ -1899,7 +1899,7 @@ cont:
1899 NETLINK_CB(cb->skb).portid, 1899 NETLINK_CB(cb->skb).portid,
1900 cb->nlh->nlmsg_seq, 1900 cb->nlh->nlmsg_seq,
1901 RTM_NEWNETCONF, NLM_F_MULTI, 1901 RTM_NEWNETCONF, NLM_F_MULTI,
1902 -1) <= 0) 1902 -1) < 0)
1903 goto done; 1903 goto done;
1904 else 1904 else
1905 h++; 1905 h++;
@@ -1910,7 +1910,7 @@ cont:
1910 NETLINK_CB(cb->skb).portid, 1910 NETLINK_CB(cb->skb).portid,
1911 cb->nlh->nlmsg_seq, 1911 cb->nlh->nlmsg_seq,
1912 RTM_NEWNETCONF, NLM_F_MULTI, 1912 RTM_NEWNETCONF, NLM_F_MULTI,
1913 -1) <= 0) 1913 -1) < 0)
1914 goto done; 1914 goto done;
1915 else 1915 else
1916 h++; 1916 h++;
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index f6e43ca5e641..2000110c75f0 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2483,7 +2483,7 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh)
2483 err = rt_fill_info(net, dst, src, &fl4, skb, 2483 err = rt_fill_info(net, dst, src, &fl4, skb,
2484 NETLINK_CB(in_skb).portid, nlh->nlmsg_seq, 2484 NETLINK_CB(in_skb).portid, nlh->nlmsg_seq,
2485 RTM_NEWROUTE, 0, 0); 2485 RTM_NEWROUTE, 0, 0);
2486 if (err <= 0) 2486 if (err < 0)
2487 goto errout_free; 2487 goto errout_free;
2488 2488
2489 err = rtnl_unicast(skb, net, NETLINK_CB(in_skb).portid); 2489 err = rtnl_unicast(skb, net, NETLINK_CB(in_skb).portid);
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 8975d9501d50..d6b4f5d08014 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4213,7 +4213,7 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
4213 goto cont; 4213 goto cont;
4214 4214
4215 if (in6_dump_addrs(idev, skb, cb, type, 4215 if (in6_dump_addrs(idev, skb, cb, type,
4216 s_ip_idx, &ip_idx) <= 0) 4216 s_ip_idx, &ip_idx) < 0)
4217 goto done; 4217 goto done;
4218cont: 4218cont:
4219 idx++; 4219 idx++;