From: Paolo Abeni <pabeni@redhat.com>
To: Stefan Wiehler <stefan.wiehler@nokia.com>,
Jakub Kicinski <kuba@kernel.org>,
Breno Leitao <leitao@debian.org>
Cc: "David S. Miller" <davem@davemloft.net>,
David Ahern <dsahern@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Simon Horman <horms@kernel.org>, David Ahern <dsahern@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
Subject: Re: [PATCH net v2] ipmr: Fix access to mfc_cache_list without lock held
Date: Fri, 15 Nov 2024 17:55:11 +0100 [thread overview]
Message-ID: <9837c682-72a0-428e-81ab-b42f201b3c71@redhat.com> (raw)
In-Reply-To: <9cdf4969-8422-4cda-b1d0-35a57a1fe233@nokia.com>
On 11/15/24 17:07, Stefan Wiehler wrote:
>> On Fri, 15 Nov 2024 01:16:27 -0800 Breno Leitao wrote:
>>> This one seems to be discussed in the following thread already.
>>>
>>> https://lore.kernel.org/all/20241017174109.85717-1-stefan.wiehler@nokia.com/
>>
>> That's why it rung a bell..
>> Stefan, are you planning to continue with the series?
>
> Yes, sorry for the delay, went on vacation and was busy with other tasks, but
> next week I plan to continue (i.e. refactor using refcount_t).
I forgot about that series and spent a little time investigating the
scenario.
I think we don't need a refcount: the tables are freed only at netns
cleanup time, so the netns refcount is enough to guarantee that the
tables are not deleted when escaping the RCU section.
Some debug assertions could help clarify, document and make the schema
more robust to later change.
Side note, I think we need to drop the RCU lock moved by:
https://lore.kernel.org/all/20241017174109.85717-2-stefan.wiehler@nokia.com/
as the seqfile core can call blocking functions - alloc(GFP_KERNEL) -
between ->start() and ->stop().
The issue is pre-existent to that patch, and even to the patch
introducing the original RCU() - the old read_lock() created an illegal
atomic scope - but I think we should address it while touching this code.
I have some patches implementing the above but I have hard times testing
vs net/forwarding, as the forwarding ST setup is eluding me - with
mausezahn internal errors.
@Jakub: do you have by chance any cheap tip handy about the forwarding
self-tests setup?
Thanks,
Paolo
next prev parent reply other threads:[~2024-11-15 16:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 14:08 [PATCH net v2] ipmr: Fix access to mfc_cache_list without lock held Breno Leitao
2024-11-11 1:00 ` David Ahern
2024-11-14 3:10 ` Jakub Kicinski
2024-11-14 8:55 ` Breno Leitao
2024-11-14 15:03 ` Jakub Kicinski
2024-11-15 9:16 ` Breno Leitao
2024-11-15 16:00 ` Jakub Kicinski
2024-11-15 16:07 ` Stefan Wiehler
2024-11-15 16:55 ` Paolo Abeni [this message]
2024-11-15 19:16 ` Jakub Kicinski
2024-11-20 9:54 ` Paolo Abeni
2024-11-14 3:20 ` 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=9837c682-72a0-428e-81ab-b42f201b3c71@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--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