netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, Kuniyuki Iwashima <kuniyu@amazon.com>,
	Simon Horman <horms@kernel.org>,
	eric.dumazet@gmail.com
Subject: Re: [PATCH v2 net 09/16] ipv4: icmp: convert to dev_net_rcu()
Date: Mon, 3 Feb 2025 15:36:33 -0800	[thread overview]
Message-ID: <20250203153633.46ce0337@kernel.org> (raw)
In-Reply-To: <20250203143046.3029343-10-edumazet@google.com>

On Mon,  3 Feb 2025 14:30:39 +0000 Eric Dumazet wrote:
> @@ -611,9 +611,9 @@ void __icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info,
>  		goto out;
>  
>  	if (rt->dst.dev)
> -		net = dev_net(rt->dst.dev);
> +		net = dev_net_rcu(rt->dst.dev);
>  	else if (skb_in->dev)
> -		net = dev_net(skb_in->dev);
> +		net = dev_net_rcu(skb_in->dev);
>  	else
>  		goto out;

Hm. Weird. NIPA says this one is not under RCU.

[  275.730657][    C1] ./include/net/net_namespace.h:404 suspicious rcu_dereference_check() usage!
[  275.731033][    C1] 
[  275.731033][    C1] other info that might help us debug this:
[  275.731033][    C1] 
[  275.731471][    C1] 
[  275.731471][    C1] rcu_scheduler_active = 2, debug_locks = 1
[  275.731799][    C1] 1 lock held by swapper/1/0:
[  275.732000][    C1]  #0: ffffc900001e0ae8 ((&n->timer)){+.-.}-{0:0}, at: call_timer_fn+0xe8/0x230
[  275.732354][    C1] 
[  275.732354][    C1] stack backtrace:
[  275.732638][    C1] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted 6.13.0-virtme #1
[  275.732643][    C1] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  275.732646][    C1] Call Trace:
[  275.732647][    C1]  <IRQ>
[  275.732651][    C1]  dump_stack_lvl+0xb0/0xd0
[  275.732663][    C1]  lockdep_rcu_suspicious+0x1ea/0x280
[  275.732678][    C1]  __icmp_send+0xb0d/0x1580
[  275.732695][    C1]  ? tcp_data_queue+0x8/0x22d0
[  275.732701][    C1]  ? lockdep_hardirqs_on_prepare+0x12b/0x410
[  275.732712][    C1]  ? __pfx___icmp_send+0x10/0x10
[  275.732719][    C1]  ? tcp_check_space+0x3ce/0x5f0
[  275.732742][    C1]  ? rcu_read_lock_any_held+0x43/0xb0
[  275.732750][    C1]  ? validate_chain+0x1fe/0xae0
[  275.732771][    C1]  ? __pfx_validate_chain+0x10/0x10
[  275.732778][    C1]  ? hlock_class+0x4e/0x130
[  275.732784][    C1]  ? mark_lock+0x38/0x3e0
[  275.732788][    C1]  ? sock_put+0x1a/0x60
[  275.732806][    C1]  ? __lock_acquire+0xb9a/0x1680
[  275.732822][    C1]  ipv4_send_dest_unreach+0x3b4/0x800
[  275.732829][    C1]  ? neigh_invalidate+0x1c7/0x540
[  275.732837][    C1]  ? __pfx_ipv4_send_dest_unreach+0x10/0x10
[  275.732850][    C1]  ipv4_link_failure+0x1b/0x190
[  275.732856][    C1]  arp_error_report+0x96/0x170
[  275.732862][    C1]  neigh_invalidate+0x209/0x540
[  275.732873][    C1]  neigh_timer_handler+0x87a/0xdf0
[  275.732883][    C1]  ? __pfx_neigh_timer_handler+0x10/0x10
[  275.732886][    C1]  call_timer_fn+0x13b/0x230
[  275.732891][    C1]  ? call_timer_fn+0xe8/0x230
[  275.732894][    C1]  ? call_timer_fn+0xe8/0x230
[  275.732899][    C1]  ? __pfx_call_timer_fn+0x10/0x10
[  275.732902][    C1]  ? mark_lock+0x38/0x3e0
[  275.732920][    C1]  __run_timers+0x545/0x810
[  275.732925][    C1]  ? __pfx_neigh_timer_handler+0x10/0x10
[  275.732936][    C1]  ? __pfx___run_timers+0x10/0x10
[  275.732939][    C1]  ? __lock_release+0x103/0x460
[  275.732947][    C1]  ? do_raw_spin_lock+0x131/0x270
[  275.732952][    C1]  ? __pfx_do_raw_spin_lock+0x10/0x10
[  275.732956][    C1]  ? lock_acquire+0x32/0xc0
[  275.732958][    C1]  ? timer_expire_remote+0x96/0xf0
[  275.732967][    C1]  timer_expire_remote+0x9e/0xf0
[  275.732970][    C1]  tmigr_handle_remote_cpu+0x278/0x440
[  275.732977][    C1]  ? __pfx_tmigr_handle_remote_cpu+0x10/0x10
[  275.732981][    C1]  ? __pfx___lock_release+0x10/0x10
[  275.732985][    C1]  ? __pfx_lock_acquire.part.0+0x10/0x10
[  275.733015][    C1]  tmigr_handle_remote_up+0x1a6/0x270
[  275.733027][    C1]  ? __pfx_tmigr_handle_remote_up+0x10/0x10
[  275.733036][    C1]  __walk_groups.isra.0+0x44/0x160
[  275.733051][    C1]  tmigr_handle_remote+0x20b/0x300

Decoded:
https://netdev-3.bots.linux.dev/vmksft-mptcp-dbg/results/976941/vm-crash-thr0-1

  reply	other threads:[~2025-02-03 23:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-03 14:30 [PATCH v2 net 00/16] net: first round to use dev_net_rcu() Eric Dumazet
2025-02-03 14:30 ` [PATCH v2 net 01/16] net: add dev_net_rcu() helper Eric Dumazet
2025-02-03 14:30 ` [PATCH v2 net 02/16] ipv4: add RCU protection to ip4_dst_hoplimit() Eric Dumazet
2025-02-03 14:30 ` [PATCH v2 net 03/16] ipv4: use RCU protection in ip_dst_mtu_maybe_forward() Eric Dumazet
2025-02-03 14:30 ` [PATCH v2 net 04/16] ipv4: use RCU protection in ipv4_default_advmss() Eric Dumazet
2025-02-03 14:30 ` [PATCH v2 net 05/16] ipv4: use RCU protection in rt_is_expired() Eric Dumazet
2025-02-03 14:30 ` [PATCH v2 net 06/16] tcp: convert to dev_net_rcu() Eric Dumazet
2025-02-03 14:30 ` [PATCH v2 net 07/16] net: gro: convert four dev_net() calls Eric Dumazet
2025-02-03 14:30 ` [PATCH v2 net 08/16] udp: convert to dev_net_rcu() Eric Dumazet
2025-02-03 14:30 ` [PATCH v2 net 09/16] ipv4: icmp: " Eric Dumazet
2025-02-03 23:36   ` Jakub Kicinski [this message]
2025-02-04  4:14     ` Eric Dumazet
2025-02-04  4:57       ` Eric Dumazet
2025-02-04 10:35         ` Eric Dumazet
2025-02-04 16:21           ` Matthieu Baerts
2025-02-04 16:56             ` Eric Dumazet
2025-02-04 16:21           ` Jakub Kicinski
2025-02-03 14:30 ` [PATCH v2 net 10/16] ipv6: " Eric Dumazet
2025-02-03 14:30 ` [PATCH v2 net 11/16] ipv6: input: " Eric Dumazet
2025-02-03 14:30 ` [PATCH v2 net 12/16] ipv6: output: " Eric Dumazet
2025-02-03 14:30 ` [PATCH v2 net 13/16] ipv6: use RCU protection in ip6_default_advmss() Eric Dumazet
2025-02-03 14:30 ` [PATCH v2 net 14/16] net: filter: convert to dev_net_rcu() Eric Dumazet
2025-02-03 14:30 ` [PATCH v2 net 15/16] flow_dissector: use rcu protection to fetch dev_net() Eric Dumazet
2025-02-03 23:38   ` Jakub Kicinski
2025-02-04  4:16     ` Eric Dumazet
2025-02-03 14:30 ` [PATCH v2 net 16/16] ipv4: use RCU protection in inet_select_addr() 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=20250203153633.46ce0337@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@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).