From: Arjan van de Ven Date: Fri, 2 May 2008 23:21:07 +0000 (-0700) Subject: net: Add a WARN_ON_ONCE() to the transmit timeout function X-Git-Tag: v2.6.26-rc1~5^2~21 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b4192bbd85d29eb3bec7f9297d6464250e6a7a90;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index b741618e4d5..d355e5e47fe 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->name); dev->tx_timeout(dev); + WARN_ON_ONCE(1); } if (!mod_timer(&dev->watchdog_timer, round_jiffies(jiffies + dev->watchdog_timeo))) dev_hold(dev);