lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C605E34.5060106@candelatech.com>
Date:	Mon, 09 Aug 2010 12:59:48 -0700
From:	Ben Greear <greearb@...delatech.com>
To:	Ben Greear <greearb@...delatech.com>
CC:	netdev@...r.kernel.org
Subject: Re: [net-next] net:  Provide details on watchdog timeout.

On 08/09/2010 12:59 PM, Ben Greear wrote:
> This keeps the WARN_ON but will also log normal kernel messages
> after the WARN_ON logic has happened once.

This is compile-tested only, by the way.

Thanks,
Ben

>
> Signed-off-by: Ben Greear<greearb@...delatech.com>
> ---
> :100644 100644 2aeb3a4... 66e6154... M	net/sched/sch_generic.c
>   net/sched/sch_generic.c |   23 ++++++++++++++++++++---
>   1 files changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
> index 2aeb3a4..66e6154 100644
> --- a/net/sched/sch_generic.c
> +++ b/net/sched/sch_generic.c
> @@ -253,9 +253,26 @@ static void dev_watchdog(unsigned long arg)
>   			}
>
>   			if (some_queue_timedout) {
> -				char drivername[64];
> -				WARN_ONCE(1, KERN_INFO "NETDEV WATCHDOG: %s (%s): transmit queue %u timed out\n",
> -				       dev->name, netdev_drivername(dev, drivername, 64), i);
> +				static bool do_once = true;
> +				if (do_once || net_ratelimit()) {
> +					char drivername[64];
> +					if (unlikely(do_once)) {
> +						WARN(1, KERN_INFO "NETDEV WATCHDOG: %s (%s): "
> +						     "transmit queue %u timed out"
> +						     " trans-start: %lu  jiffies: %lu\n",
> +						     dev->name,
> +						     netdev_drivername(dev, drivername, 64),
> +						     i, trans_start, jiffies);
> +						do_once = false;
> +					}
> +					else
> +						printk(KERN_INFO "NETDEV WATCHDOG: %s (%s): "
> +						       "transmit queue %u timed out"
> +						       " trans-start: %lu  jiffies: %lu\n",
> +						       dev->name,
> +						       netdev_drivername(dev, drivername, 64),
> +						       i, trans_start, jiffies);
> +				}
>   				dev->netdev_ops->ndo_tx_timeout(dev);
>   			}
>   			if (!mod_timer(&dev->watchdog_timer,


-- 
Ben Greear <greearb@...delatech.com>
Candela Technologies Inc  http://www.candelatech.com

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ