From: Florian Westphal <fw@strlen.de>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Networking <netdev@vger.kernel.org>,
David Ahern <dsahern@gmail.com>, Florian Westphal <fw@strlen.de>
Subject: Re: [RFC] ifa_list needs proper rcu protection
Date: Sat, 4 May 2019 20:01:39 +0200 [thread overview]
Message-ID: <20190504180139.ftpnwgefjvukda7w@breakpoint.cc> (raw)
In-Reply-To: <7bdc26e6-ce41-02ba-baef-3e4e908f6dd7@gmail.com>
Eric Dumazet <eric.dumazet@gmail.com> wrote:
Sorry for late reply.
> It looks that unless RTNL is held, accessing ifa_list needs proper RCU protection ?
>
> indev->ifa_list can be changed under us by another cpu (which owns RTNL)
>
> Lets took an example.
>
> (A proper rcu_dereference() with an happy sparse support would require adding __rcu attribute,
> I put a READ_ONCE() which should be just fine in this particular context)
I don't see e.g. __inet_insert_ifa() use rcu_assign_pointer() or similar
primitive, so I don't think its enough to change readers.
Same for __inet_del_ifa(), i see freeing gets dealyed via call_rcu, but
it uses normal assignemts instead of a rcu helper.
So, I am afraid we will have to sprinkle some rcu_assign_/derefence in
several places.
next prev parent reply other threads:[~2019-05-04 18:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-25 22:50 [RFC] ifa_list needs proper rcu protection Eric Dumazet
2019-05-04 18:01 ` Florian Westphal [this message]
2019-05-04 18:06 ` Eric Dumazet
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=20190504180139.ftpnwgefjvukda7w@breakpoint.cc \
--to=fw@strlen.de \
--cc=dsahern@gmail.com \
--cc=eric.dumazet@gmail.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