diff options
author | Eric Dumazet <edumazet@google.com> | 2024-03-06 11:24:26 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-03-08 05:48:22 +0100 |
commit | 02e24903e5a46b7a7fca44bcfe0cd6fa5b240c34 (patch) | |
tree | edfd71bc7d022a0bc4af6570d19fa8a95e7621f1 /net/core | |
parent | selftests/net: fix waiting time for ipv6_gc test in fib_tests.sh. (diff) | |
download | linux-02e24903e5a46b7a7fca44bcfe0cd6fa5b240c34.tar.xz linux-02e24903e5a46b7a7fca44bcfe0cd6fa5b240c34.zip |
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/core')
-rw-r--r-- | net/core/rtnetlink.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index e0353487c57e..a3d7847ce69d 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -2267,11 +2267,8 @@ walk_entries: nlh->nlmsg_seq, 0, flags, ext_filter_mask, 0, NULL, 0, netnsid, GFP_KERNEL); - if (err < 0) { - if (likely(skb->len)) - err = skb->len; + if (err < 0) break; - } } cb->seq = tgt_net->dev_base_seq; nl_dump_check_consistent(cb, nlmsg_hdr(skb)); |