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:	Sat, 9 Dec 2006 10:59:52 +1100
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Andrew Morton <akpm@...l.org>
Cc:	Ingo Molnar <mingo@...e.hu>, Alan <alan@...rguk.ukuu.org.uk>,
	Len Brown <lenb@...nel.org>, linux-kernel@...r.kernel.org,
	ak@...e.de, Linus Torvalds <torvalds@...l.org>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [patch] net: dev_watchdog() locking fix

On Fri, Dec 08, 2006 at 03:19:02PM -0800, Andrew Morton wrote:
> 
> Like this?
> 
> 	/* don't get messages out of order, and no recursion */
> 	if (skb_queue_len(&npinfo->txq) == 0 &&
> 		    npinfo->poll_owner != smp_processor_id()) {
> 		local_bh_disable();	/* Where's netif_tx_trylock_bh()? */
> 		if (netif_tx_trylock(dev)) {
> 			/* try until next clock tick */
> 			for (tries = jiffies_to_usecs(1)/USEC_PER_POLL;
> 					tries > 0; --tries) {
> 				if (!netif_queue_stopped(dev))
> 					status = dev->hard_start_xmit(skb, dev);
> 
> 				if (status == NETDEV_TX_OK)
> 					break;
> 
> 				/* tickle device maybe there is some cleanup */
> 				netpoll_poll(np);
> 
> 				udelay(USEC_PER_POLL);
> 			}
> 			netif_tx_unlock(dev);
> 		}
> 		local_bh_enable();
> 	}

Looks good to me.  Thanks Andrew!
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ