aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2008-05-02 19:21:07 -0400
committerDavid S. Miller <davem@davemloft.net>2008-05-02 19:21:07 -0400
commitb4192bbd85d29eb3bec7f9297d6464250e6a7a90 (patch)
tree37d4e4ecea52e85e561d29faca0f5db5804348d3 /net
parent50aab54f3056ba28afc681f71adee41c399dde1e (diff)
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 <arjan@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sched/sch_generic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index b741618e4d54..d355e5e47fe3 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -219,6 +219,7 @@ static void dev_watchdog(unsigned long arg)
219 printk(KERN_INFO "NETDEV WATCHDOG: %s: transmit timed out\n", 219 printk(KERN_INFO "NETDEV WATCHDOG: %s: transmit timed out\n",
220 dev->name); 220 dev->name);
221 dev->tx_timeout(dev); 221 dev->tx_timeout(dev);
222 WARN_ON_ONCE(1);
222 } 223 }
223 if (!mod_timer(&dev->watchdog_timer, round_jiffies(jiffies + dev->watchdog_timeo))) 224 if (!mod_timer(&dev->watchdog_timer, round_jiffies(jiffies + dev->watchdog_timeo)))
224 dev_hold(dev); 225 dev_hold(dev);