Thread (29 messages) flat view 29 messages, 4 authors, 2017-09-20

Re: Latest net-next from GIT panic

From: Eric Dumazet <hidden>
Date: 2017-09-20 13:37:40

Possibly related (same subject, not in this thread)

On Wed, 2017-09-20 at 06:34 -0700, Eric Dumazet wrote:
quoted hunk ↗ jump to hunk
Could you try this debug patch ?
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index f535779d9dc1dfe36934c2abba4e43d053ac5d6f..1eaa3553a724dc8c048f67b556337072d5addc82 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3331,7 +3331,14 @@ void netdev_run_todo(void);
  */
 static inline void dev_put(struct net_device *dev)
 {
-	this_cpu_dec(*dev->pcpu_refcnt);
+	int __percpu *pref = READ_ONCE(dev->pcpu_refcnt);
+
+	if (!pref) {
+		pr_err("no pcpu_refcnt on dev %p(%s) state %d dismantle %d\n",
+		       dev, dev->name, dev->reg_state, dev->dismantle);
+		BUG();
+	}
+	this_cpu_dec(*pref);
 }
 
 /**
And since the console will be filled by stack trace, maybe instead of
BUG() use some infinite loop ?

for (;;)
	cpu_relax();
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help