Thread (10 messages) 10 messages, 3 authors, 2026-02-02

Re: [PATCH net] net: add RCU protection to (struct packet_type)->dev

From: Eric Dumazet <edumazet@google.com>
Date: 2026-02-02 08:47:37

On Mon, Feb 2, 2026 at 9:21 AM dongchenchen (A)
[off-list ref] wrote:
quoted hunk ↗ jump to hunk

}

[2] add delay to pype_seq_next
diff --git a/net/core/net-procfs.c b/net/core/net-procfs.c
index 160dd729178f..73f5a20ef57c 100644
--- a/net/core/net-procfs.c
+++ b/net/core/net-procfs.c
@@ -230,11 +230,14 @@ static void *ptype_seq_next(struct seq_file *seq, void *v, loff_t *pos)

         pt = v;
         nxt = pt->list.next;
+       if (pt->dev)
+               mdelay(5000);
Waiting 5 seconds while holding RCU is going to fire the soft lockup
detection after ~two calls to ptype_seq_next()

What is the actual trace you got, and what happens if you reduce to
mdelay(1000) ?
         dev = rcu_dereference(pt->dev);

[3] run_test.sh
./packet_type_test &
cat /proc/$(pgrep -x "packet_type_test")/net/ptype &
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help