diff options
author | Eric Dumazet <edumazet@google.com> | 2024-03-06 10:24:26 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-03-07 20:48:22 -0800 |
commit | 02e24903e5a46b7a7fca44bcfe0cd6fa5b240c34 (patch) | |
tree | edfd71bc7d022a0bc4af6570d19fa8a95e7621f1 /net/ipv6 | |
parent | 4af9a0bee116e927a88da903a9244bb7d03483e3 (diff) |
netlink: let core handle error cases in dump operations
After commit b5a899154aa9 ("netlink: handle EMSGSIZE errors
in the core"), we can remove some code that was not 100 % correct
anyway.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20240306102426.245689-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/addrconf.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 2f84e6ecf19f..f786b65d12e4 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -793,8 +793,6 @@ static int inet6_netconf_dump_devconf(struct sk_buff *skb, ctx->all_default++; } done: - if (err < 0 && likely(skb->len)) - err = skb->len; rcu_read_unlock(); return err; } @@ -6158,11 +6156,8 @@ static int inet6_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb) NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, RTM_NEWLINK, NLM_F_MULTI); - if (err < 0) { - if (likely(skb->len)) - err = skb->len; + if (err < 0) break; - } } rcu_read_unlock(); |