Skip to content

Commit

Permalink
net: Add a WARN_ON_ONCE() to the transmit timeout function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
fenrus75 authored and davem330 committed May 2, 2008
1 parent 50aab54 commit b4192bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b4192bb

Please sign in to comment.