login
Header Space

 
 

[PATCH] net: Add a WARN_ON_ONCE() to the transmit timeout function

Previous thread: [PATCH] fs_enet: Fix a memory leak in fs_enet_mdio_probe by Scott Wood on Friday, May 2, 2008 - 2:31 pm. (2 messages)

Next thread: [PATCH v2] fs_enet: Fix a memory leak in fs_enet_mdio_probe by Scott Wood on Friday, May 2, 2008 - 2:42 pm. (2 messages)
To: <netdev@...>
Cc: <akpm@...>, <linux-kernel@...>
Date: Thursday, May 1, 2008 - 4:34 pm

From: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Subject: [PATCH] net: Add a WARN_ON_ONCE() to the transmit timeout function

WARN_ON_ONCE() gives a stack trace including the full module list.
Having this in the kernel dump for the timeout case in the
generic netdev watchdog will help us see quicker which driver
is involved. It also allows us to collect statistics 
and patterns in terms of which drivers have this event occuring.

Suggested by Andrew Morton

Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
---
 net/sched/sch_generic.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index b741618..d355e5e 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -219,6 +219,7 @@ static void dev_watchdog(unsigned long arg)
 				printk(KERN_INFO "NETDEV WATCHDOG: %s: transmit timed out\n",
 				       dev-&gt;name);
 				dev-&gt;tx_timeout(dev);
+				WARN_ON_ONCE(1);
 			}
 			if (!mod_timer(&amp;dev-&gt;watchdog_timer, round_jiffies(jiffies + dev-&gt;watchdog_timeo)))
 				dev_hold(dev);
-- 
1.5.4.5

--
To: <arjan@...>
Cc: <netdev@...>, <akpm@...>, <linux-kernel@...>
Date: Friday, May 2, 2008 - 7:21 pm

From: Arjan van de Ven &lt;arjan@infradead.org&gt;

Looks good, applied.
--
Previous thread: [PATCH] fs_enet: Fix a memory leak in fs_enet_mdio_probe by Scott Wood on Friday, May 2, 2008 - 2:31 pm. (2 messages)

Next thread: [PATCH v2] fs_enet: Fix a memory leak in fs_enet_mdio_probe by Scott Wood on Friday, May 2, 2008 - 2:42 pm. (2 messages)
speck-geostationary