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]
Date:	Mon, 30 Jan 2012 14:05:11 +0000
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Denis Kirjanov <kirjanov@...il.com>,
	"Mike ." <mike-bugreport@...mail.com>, 656476@...s.debian.org,
	netdev <netdev@...r.kernel.org>
Subject: Re: Sundance network driver (D-Link DFE-580TX) timeouts rendering
 interface unusable

On Mon, 2012-01-30 at 11:14 +0100, Eric Dumazet wrote:
> Le lundi 30 janvier 2012 à 12:51 +0300, Denis Kirjanov a écrit :
> > I'll check this out. After kernel.org was cracked I've missed
> > @kernel.org mail account.
> 
> 
> At first glance, start_tx() is racy against TX completion.
> 
> It does :
> 
>         if (np->cur_tx - np->dirty_tx < TX_QUEUE_LEN - 1 &&
>             !netif_queue_stopped(dev)) {
>                 /* do nothing */
>         } else {
>                 netif_stop_queue (dev);
>         }
> 
> So it can call netif_stop_queue() while TX completion handler did a
> cleanup of all queued packets right before.

Yes, I spotted that.  But no descriptors are pushed to the hardware
here; that's done in the driver's TX tasklet.  Although... maybe that
can run immediately when scheduled from here?  I've never had to deal
with tasklets so I really don't know their semantics.

Ben.

> Note intr_handler() doesnt hold the queue spinlock when it does :
> 
>                 if (netif_queue_stopped(dev) &&
>                         np->cur_tx - np->dirty_tx < TX_QUEUE_LEN - 4) {
>                         /* The ring is no longer full, clear busy flag. */
>                         netif_wake_queue (dev);
>                 }
> 
> 
> 

-- 
Ben Hutchings
Lowery's Law:
             If it jams, force it. If it breaks, it needed replacing anyway.

Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists