aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-01-18 23:36:08 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-18 23:36:08 -0500
commit7b46a644a407f9f2f1c8f7b2af157c79af55b49e (patch)
tree5db384821399a6e07abd70a61cc0afd454144e27 /net/ipv4/devinet.c
parent27c00132852b77b12e625cd6a0ccf43d6bf5795f (diff)
netlink: Fix bugs in nlmsg_end() conversions.
Commit 053c095a82cf ("netlink: make nlmsg_end() and genlmsg_end() void") didn't catch all of the cases where callers were breaking out on the return value being equal to zero, which they no longer should when zero means success. Fix all such cases. Reported-by: Marcel Holtmann <marcel@holtmann.org> Reported-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c6
1 files changed, 3 insertions, 3 deletions
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++;