From: David Ahern <dsahern@kernel.org>
To: netdev@vger.kernel.org, davem@davemloft.net
Cc: lirongqing@baidu.com, David Ahern <dsahern@gmail.com>
Subject: [PATCH net 0/4] net: Fixups for recent dump filtering changes
Date: Wed, 24 Oct 2018 12:58:58 -0700 [thread overview]
Message-ID: <20181024195902.17479-1-dsahern@kernel.org> (raw)
From: David Ahern <dsahern@gmail.com>
Li RongQing noted that tgt_net is leaked in ipv4 due to the recent change
to handle address dumps for a specific device. The report also applies to
ipv6 and other error paths. Patches 1 and 2 fix those leaks.
Patch 3 stops route dumps from erroring out when dumping across address
families and a table id is given. This is needed in preparation for
patch 4.
Patch 4 updates the rtnl_dump_all to handle a failure in one of the dumpit
functions. At the moment, if an address dump returns an error the dump all
loop breaks but the error is dropped. The result can be no data is returned
and no error either leaving the user wondering about the addresses.
Patches were tested with a modified iproute2 to add invalid data to the
dump request causing each specific failure path to be hit in addition
to positive testing that it works as it should when given valid data.
David Ahern (4):
net/ipv4: Put target net when address dump fails due to bad attributes
net/ipv6: Put target net when address dump fails due to bad attributes
net: Don't return invalid table id error when dumping all families
net: rtnl_dump_all needs to propagate error from dumpit function
include/net/ip_fib.h | 1 +
net/core/rtnetlink.c | 6 ++++--
net/ipv4/devinet.c | 13 ++++++++-----
net/ipv4/fib_frontend.c | 4 ++++
net/ipv4/ipmr.c | 3 +++
net/ipv6/addrconf.c | 14 ++++++++------
net/ipv6/ip6_fib.c | 3 +++
net/ipv6/ip6mr.c | 3 +++
8 files changed, 34 insertions(+), 13 deletions(-)
--
2.11.0
next reply other threads:[~2018-10-25 4:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-24 19:58 David Ahern [this message]
2018-10-24 19:58 ` [PATCH net 1/4] net/ipv4: Put target net when address dump fails due to bad attributes David Ahern
2018-10-24 19:59 ` [PATCH net 2/4] net/ipv6: " David Ahern
2018-10-24 19:59 ` [PATCH net 3/4] net: Don't return invalid table id error when dumping all families David Ahern
2018-10-24 19:59 ` [PATCH net 4/4] net: rtnl_dump_all needs to propagate error from dumpit function David Ahern
2018-10-24 21:07 ` [PATCH net 0/4] net: Fixups for recent dump filtering changes David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181024195902.17479-1-dsahern@kernel.org \
--to=dsahern@kernel.org \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=lirongqing@baidu.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).