From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
David Ahern <dsahern@kernel.org>,
Kuniyuki Iwashima <kuniyu@google.com>,
netdev@vger.kernel.org, eric.dumazet@gmail.com,
Ido Schimmel <idosch@nvidia.com>
Subject: Re: [PATCH net-next] ipv6: add IPV6_CALL() helper
Date: Sun, 1 Mar 2026 11:24:13 -0800 [thread overview]
Message-ID: <20260301112413.1b6c785e@kernel.org> (raw)
In-Reply-To: <20260301162514.3347319-1-edumazet@google.com>
On Sun, 1 Mar 2026 16:25:14 +0000 Eric Dumazet wrote:
> ipv6_stub use is racy, we should add READ_ONCE() and WRITE_ONCE(),
> even if this pointer can only change once.
>
> Add IPV6_CALL() macro to factorize the READ_ONCE(), and perform
> direct calls when CONFIG_IPV6=y.
Some crashiness detected here, I think
pw-bot: cr
[ 1831.476440][ T4627] =============================
[ 1831.476614][ T4627] WARNING: suspicious RCU usage
[ 1831.476776][ T4627] 7.0.0-rc1-virtme #1 Not tainted
[ 1831.476955][ T4627] -----------------------------
[ 1831.477119][ T4627] net/ipv6/ip6_fib.c:111 suspicious rcu_dereference_protected() usage!
[ 1831.477338][ T4627]
[ 1831.477338][ T4627] other info that might help us debug this:
[ 1831.477338][ T4627]
[ 1831.477613][ T4627]
[ 1831.477613][ T4627] rcu_scheduler_active = 2, debug_locks = 1
[ 1831.477831][ T4627] 1 lock held by ip/4627:
[ 1831.477975][ T4627] #0: ffffffff950a1d28 (rtnl_mutex){+.+.}-{4:4}, at: rtm_new_nexthop+0x1a6/0x8c0
[ 1831.478234][ T4627]
[ 1831.478234][ T4627] stack backtrace:
[ 1831.478423][ T4627] CPU: 2 UID: 0 PID: 4627 Comm: ip Not tainted 7.0.0-rc1-virtme #1 PREEMPT(full)
[ 1831.478427][ T4627] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[ 1831.478429][ T4627] Call Trace:
[ 1831.478431][ T4627] <TASK>
[ 1831.478433][ T4627] dump_stack_lvl+0x6f/0xa0
[ 1831.478440][ T4627] lockdep_rcu_suspicious.cold+0x4f/0xad
[ 1831.478445][ T4627] fib6_update_sernum+0xfb/0x130
[ 1831.478450][ T4627] nh_rt_cache_flush+0x8d/0x380
[ 1831.478454][ T4627] replace_nexthop+0x347/0x6e0
[ 1831.478458][ T4627] insert_nexthop+0x41e/0x7a0
[ 1831.478460][ T4627] ? nexthop_create+0x307/0x770
[ 1831.478463][ T4627] rtm_new_nexthop+0x3a0/0x8c0
[ 1831.478467][ T4627] ? insert_nexthop+0x7a0/0x7a0
[ 1831.478468][ T4627] ? lock_acquire.part.0+0xbc/0x260
[ 1831.478471][ T4627] ? find_held_lock+0x2b/0x80
[ 1831.478478][ T4627] ? lock_acquire.part.0+0xbc/0x260
[ 1831.478479][ T4627] ? find_held_lock+0x2b/0x80
[ 1831.478485][ T4627] ? find_held_lock+0x2b/0x80
[ 1831.478487][ T4627] ? insert_nexthop+0x7a0/0x7a0
[ 1831.478489][ T4627] ? __lock_release.isra.0+0x59/0x170
[ 1831.478492][ T4627] ? insert_nexthop+0x7a0/0x7a0
[ 1831.478494][ T4627] rtnetlink_rcv_msg+0x6fe/0xb90
[ 1831.478499][ T4627] ? rtnl_fdb_dump+0x620/0x620
[ 1831.478501][ T4627] ? __lock_acquire+0x577/0xc10
[ 1831.478511][ T4627] ? lock_acquire.part.0+0xbc/0x260
[ 1831.478513][ T4627] ? find_held_lock+0x2b/0x80
[ 1831.478516][ T4627] netlink_rcv_skb+0x123/0x380
[ 1831.478519][ T4627] ? rtnl_fdb_dump+0x620/0x620
[ 1831.478522][ T4627] ? netlink_ack+0xce0/0xce0
[ 1831.478527][ T4627] ? netlink_deliver_tap+0xc5/0x330
[ 1831.478529][ T4627] ? netlink_deliver_tap+0x13f/0x330
[ 1831.478533][ T4627] netlink_unicast+0x4a3/0x770
[ 1831.478536][ T4627] ? netlink_attachskb+0x810/0x810
[ 1831.478537][ T4627] ? __alloc_skb+0x4c4/0x5f0
[ 1831.478540][ T4627] ? napi_skb_cache_get+0x7a0/0x7a0
[ 1831.478542][ T4627] ? lock_acquire.part.0+0xbc/0x260
[ 1831.478544][ T4627] ? __lock_acquire+0x577/0xc10
[ 1831.478547][ T4627] netlink_sendmsg+0x735/0xc60
[ 1831.478550][ T4627] ? netlink_unicast+0x770/0x770
[ 1831.478553][ T4627] ? __might_fault+0x97/0x140
[ 1831.478559][ T4627] ____sys_sendmsg+0x419/0x850
[ 1831.478561][ T4627] ? copy_msghdr_from_user+0x270/0x430
[ 1831.478563][ T4627] ? get_timestamp.constprop.0+0x390/0x390
[ 1831.478564][ T4627] ? move_addr_to_kernel+0x40/0x40
[ 1831.478567][ T4627] ? stack_depot_save_flags+0x30d/0x6e0
[ 1831.478571][ T4627] ? rcu_read_lock_any_held+0x3c/0x90
[ 1831.478576][ T4627] ___sys_sendmsg+0xfd/0x180
[ 1831.478578][ T4627] ? __call_rcu_common.constprop.0+0xa6/0xa00
[ 1831.478581][ T4627] ? copy_msghdr_from_user+0x430/0x430
[ 1831.478595][ T4627] __sys_sendmsg+0x124/0x1c0
[ 1831.478597][ T4627] ? __sys_sendmsg_sock+0x20/0x20
[ 1831.478599][ T4627] ? lockdep_hardirqs_on+0x84/0x130
[ 1831.478603][ T4627] ? __call_rcu_common.constprop.0+0x3bd/0xa00
[ 1831.478608][ T4627] ? do_raw_spin_unlock+0x59/0x250
[ 1831.478610][ T4627] ? rcu_is_watching+0x15/0xd0
[ 1831.478613][ T4627] do_syscall_64+0x117/0xfc0
[ 1831.478615][ T4627] ? exc_page_fault+0xaf/0xd0
[ 1831.478617][ T4627] entry_SYSCALL_64_after_hwframe+0x4b/0x53
next prev parent reply other threads:[~2026-03-01 19:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-01 16:25 [PATCH net-next] ipv6: add IPV6_CALL() helper Eric Dumazet
2026-03-01 19:24 ` Jakub Kicinski [this message]
2026-03-01 19:36 ` Jakub Kicinski
2026-03-01 19:37 ` Eric Dumazet
-- strict thread matches above, loose matches on Subject: below --
2026-03-02 15:42 Eric Dumazet
2026-03-03 19:15 ` Kuniyuki Iwashima
2026-03-04 1:08 ` Jakub Kicinski
2026-03-04 2:13 ` Eric Dumazet
2026-03-04 2:24 ` Jakub Kicinski
2026-03-04 2:32 ` Eric Dumazet
2026-03-04 2:33 ` Eric Dumazet
2026-03-04 2:45 ` Jakub Kicinski
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=20260301112413.1b6c785e@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuniyu@google.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