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: <4DF79979.2070309@candelatech.com>
Date:	Tue, 14 Jun 2011 10:25:13 -0700
From:	Ben Greear <greearb@...delatech.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	netdev@...r.kernel.org
Subject: Re: [PATCH] net:  Ensure tx watchdog failures always print.

On 06/14/2011 10:14 AM, Eric Dumazet wrote:
> Le mardi 14 juin 2011 à 09:50 -0700, greearb@...delatech.com a écrit :
>> From: Ben Greear<greearb@...delatech.com>
>>
>> These are too important to not have some log message
>> generated.  But, keep the logic that only prints
>> a single stack dump.
>>
>> Signed-off-by: Ben Greear<greearb@...delatech.com>
>> ---
>> :100644 100644 90939ba... fce5558... M	net/sched/sch_generic.c
>>   net/sched/sch_generic.c |   16 ++++++++++++++--
>>   1 files changed, 14 insertions(+), 2 deletions(-)
>>
>> diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
>> index 90939ba..fce5558 100644
>> --- a/net/sched/sch_generic.c
>> +++ b/net/sched/sch_generic.c
>> @@ -252,8 +252,20 @@ 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;
>> +				printk(KERN_INFO "NETDEV WATCHDOG: %s (%s):"
>> +				       " transmit queue %u timed out,"
>> +				       " trans_start: %lu, wd-timeout: %i"
>> +				       " jiffies: %lu tx-queues: %i\n",
>> +				       dev->name,
>> +				       netdev_drivername(dev, drivername, 64),
>> +				       i,
>> +				       trans_start, dev->watchdog_timeo,
>> +				       jiffies, dev->num_tx_queues);
>> +				if (do_once) {
>> +					do_once = false;
>> +					WARN_ON(1);
>
> You could use WARN_ON_ONCE(1) here

Er, right..don't know what I was thinking.

Will re-send.

Thanks,
Ben

>
>> +				}
>>   				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