mbox series

[v1,net-next,0/2] net: Clean up af_ops->{get_link_af_size,fill_link_af}().

Message ID 20240815211137.62280-1-kuniyu@amazon.com (mailing list archive)
Headers show
Series net: Clean up af_ops->{get_link_af_size,fill_link_af}(). | expand

Message

Kuniyuki Iwashima Aug. 15, 2024, 9:11 p.m. UTC
Since commit 5fa85a09390c ("net: core: rcu-ify rtnl af_ops"),
af_ops->{get_link_af_size,fill_link_af}() are called under RCU.

Patch 1 makes the context clear and patch 2 removes unnecessary
rcu_read_lock().


Kuniyuki Iwashima (2):
  ipv4: Use RCU helper in inet_get_link_af_size() and
    inet_fill_link_af().
  net: bridge: Remove rcu_read_lock() in br_get_link_af_size_filtered().

 net/bridge/br_netlink.c | 2 --
 net/ipv4/devinet.c      | 6 ++----
 2 files changed, 2 insertions(+), 6 deletions(-)

Comments

Jakub Kicinski Aug. 16, 2024, 1:36 a.m. UTC | #1
On Thu, 15 Aug 2024 14:11:35 -0700 Kuniyuki Iwashima wrote:
> Since commit 5fa85a09390c ("net: core: rcu-ify rtnl af_ops"),
> af_ops->{get_link_af_size,fill_link_af}() are called under RCU.
> 
> Patch 1 makes the context clear and patch 2 removes unnecessary
> rcu_read_lock().

Tests violently disagree.

https://netdev.bots.linux.dev/contest.html?branch=net-next-2024-08-16--00-00&pw-n=0&pass=0
Kuniyuki Iwashima Aug. 16, 2024, 2:39 a.m. UTC | #2
From: Jakub Kicinski <kuba@kernel.org>
Date: Thu, 15 Aug 2024 18:36:51 -0700
> On Thu, 15 Aug 2024 14:11:35 -0700 Kuniyuki Iwashima wrote:
> > Since commit 5fa85a09390c ("net: core: rcu-ify rtnl af_ops"),
> > af_ops->{get_link_af_size,fill_link_af}() are called under RCU.
> > 
> > Patch 1 makes the context clear and patch 2 removes unnecessary
> > rcu_read_lock().
> 
> Tests violently disagree.
> 
> https://netdev.bots.linux.dev/contest.html?branch=net-next-2024-08-16--00-00&pw-n=0&pass=0

Sorry, I missed the birdge one is called under RTNL.
I'll drop patch 2.