netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: Eric Dumazet <edumazet@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Kuniyuki Iwashima <kuniyu@amazon.com>,
	Jiri Pirko <jiri@resnulli.us>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH net-next 0/5] net: remove RTNL from fib_seq_sum()
Date: Wed, 9 Oct 2024 15:16:05 -0600	[thread overview]
Message-ID: <8be5e4f4-436e-41fb-a6c1-c22e9225505a@kernel.org> (raw)
In-Reply-To: <20241009184405.3752829-1-edumazet@google.com>

On 10/9/24 12:44 PM, Eric Dumazet wrote:
> This series is inspired by a syzbot report showing
> rtnl contention and one thread blocked in:
> 
> 7 locks held by syz-executor/10835:
>   #0: ffff888033390420 (sb_writers#8){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2931 [inline] 
>   #0: ffff888033390420 (sb_writers#8){.+.+}-{0:0}, at: vfs_write+0x224/0xc90 fs/read_write.c:679
>   #1: ffff88806df6bc88 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x1ea/0x500 fs/kernfs/file.c:325
>   #2: ffff888026fcf3c8 (kn->active#50){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x20e/0x500 fs/kernfs/file.c:326
>   #3: ffffffff8f56f848 (nsim_bus_dev_list_lock){+.+.}-{3:3}, at: new_device_store+0x1b4/0x890 drivers/net/netdevsim/bus.c:166
>   #4: ffff88805e0140e8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:1014 [inline] 
>   #4: ffff88805e0140e8 (&dev->mutex){....}-{3:3}, at: __device_attach+0x8e/0x520 drivers/base/dd.c:1005
>   #5: ffff88805c5fb250 (&devlink->lock_key#55){+.+.}-{3:3}, at: nsim_drv_probe+0xcb/0xb80 drivers/net/netdevsim/dev.c:1534
>   #6: ffffffff8fcd1748 (rtnl_mutex){+.+.}-{3:3}, at: fib_seq_sum+0x31/0x290 net/core/fib_notifier.c:46
> 
> This is not a bug fix, unless I am mistaken, thus targeting net-next.
> 
> 
> Eric Dumazet (5):
>   fib: rules: use READ_ONCE()/WRITE_ONCE() on ops->fib_rules_seq
>   ipv4: use READ_ONCE()/WRITE_ONCE() on net->ipv4.fib_seq
>   ipv6: use READ_ONCE()/WRITE_ONCE() on fib6_table->fib_seq
>   ipmr: use READ_ONCE() to read net->ipv[46].ipmr_seq
>   net: do not acquire rtnl in fib_seq_sum()
> 
>  include/net/fib_notifier.h |  2 +-
>  include/net/fib_rules.h    |  2 +-
>  include/net/ip6_fib.h      |  8 ++++----
>  include/net/ip_fib.h       |  4 ++--
>  include/net/netns/ipv4.h   |  2 +-
>  net/core/fib_notifier.c    |  2 --
>  net/core/fib_rules.c       | 14 ++++++++------
>  net/ipv4/fib_notifier.c    | 10 +++++-----
>  net/ipv4/fib_rules.c       |  2 +-
>  net/ipv4/ipmr.c            | 10 ++++------
>  net/ipv6/fib6_notifier.c   |  2 +-
>  net/ipv6/fib6_rules.c      |  2 +-
>  net/ipv6/ip6_fib.c         | 14 +++++++-------
>  net/ipv6/ip6mr.c           | 10 ++++------
>  14 files changed, 40 insertions(+), 44 deletions(-)
> 

For the set:
Reviewed-by: David Ahern <dsahern@kernel.org>


  parent reply	other threads:[~2024-10-09 21:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09 18:44 [PATCH net-next 0/5] net: remove RTNL from fib_seq_sum() Eric Dumazet
2024-10-09 18:44 ` [PATCH net-next 1/5] fib: rules: use READ_ONCE()/WRITE_ONCE() on ops->fib_rules_seq Eric Dumazet
2024-10-09 23:47   ` Kuniyuki Iwashima
2024-10-09 18:44 ` [PATCH net-next 2/5] ipv4: use READ_ONCE()/WRITE_ONCE() on net->ipv4.fib_seq Eric Dumazet
2024-10-09 23:53   ` Kuniyuki Iwashima
2024-10-09 18:44 ` [PATCH net-next 3/5] ipv6: use READ_ONCE()/WRITE_ONCE() on fib6_table->fib_seq Eric Dumazet
2024-10-09 23:55   ` Kuniyuki Iwashima
2024-10-09 18:44 ` [PATCH net-next 4/5] ipmr: use READ_ONCE() to read net->ipv[46].ipmr_seq Eric Dumazet
2024-10-10  0:05   ` Kuniyuki Iwashima
2024-10-09 18:44 ` [PATCH net-next 5/5] net: do not acquire rtnl in fib_seq_sum() Eric Dumazet
2024-10-10  0:07   ` Kuniyuki Iwashima
2024-10-09 21:16 ` David Ahern [this message]
2024-10-11 22:50 ` [PATCH net-next 0/5] net: remove RTNL from fib_seq_sum() 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=8be5e4f4-436e-41fb-a6c1-c22e9225505a@kernel.org \
    --to=dsahern@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=kuniyu@amazon.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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).