From: David Ahern <dsahern@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org
Cc: Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
stefan.wiehler@nokia.com
Subject: Re: [PATCH v2 net 2/3] ip6mr: fix tables suspicious RCU usage
Date: Tue, 26 Nov 2024 08:39:44 -0700 [thread overview]
Message-ID: <57614d75-7f44-40be-8078-cc4a0773a0cd@kernel.org> (raw)
In-Reply-To: <3a8b03f560f0b4b447a227950e6e5283231d138b.1732289799.git.pabeni@redhat.com>
On 11/24/24 8:40 AM, Paolo Abeni wrote:
> Several places call ip6mr_get_table() with no RCU nor RTNL lock.
> Add RCU protection inside such helper and provide a lockless variant
> for the few callers that already acquired the relevant lock.
>
> Note that some users additionally reference the table outside the RCU
> lock. That is actually safe as the table deletion can happen only
> after all table accesses are completed.
>
> Fixes: e2d57766e674 ("net: Provide compat support for SIOCGETMIFCNT_IN6 and SIOCGETSGCNT_IN6.")
> Fixes: d7c31cbde4bc ("net: ip6mr: add RTM_GETROUTE netlink op")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> net/ipv6/ip6mr.c | 38 +++++++++++++++++++++++++++-----------
> 1 file changed, 27 insertions(+), 11 deletions(-)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
next prev parent reply other threads:[~2024-11-26 15:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-24 15:40 [PATCH v2 net 0/3] net: fix mcast RCU splats Paolo Abeni
2024-11-24 15:40 ` [PATCH v2 net 1/3] ipmr: add debug check for mr table cleanup Paolo Abeni
2024-11-26 15:34 ` David Ahern
2024-11-24 15:40 ` [PATCH v2 net 2/3] ip6mr: fix tables suspicious RCU usage Paolo Abeni
2024-11-26 15:39 ` David Ahern [this message]
2024-11-24 15:40 ` [PATCH v2 net 3/3] ipmr: " Paolo Abeni
2024-11-26 15:40 ` David Ahern
2024-11-28 9:30 ` [PATCH v2 net 0/3] net: fix mcast RCU splats patchwork-bot+netdevbpf
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=57614d75-7f44-40be-8078-cc4a0773a0cd@kernel.org \
--to=dsahern@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stefan.wiehler@nokia.com \
/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).