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:	Tue, 15 May 2012 20:29:19 +0200
From:	Francois Romieu <romieu@...zoreil.com>
To:	David Miller <davem@...emloft.net>
Cc:	yoshihiro.shimoda.uh@...esas.com, netdev@...r.kernel.org,
	linux-sh@...r.kernel.org
Subject: Re: [PATCH v3 6/6] net: sh_eth: use NAPI

David Miller <davem@...emloft.net> :
> From: "Shimoda, Yoshihiro" <yoshihiro.shimoda.uh@...esas.com>
[...]
> > I will modify the code as the following. Is it correct?
> > 
> > 	if (txfree_num) {
> > 		netif_tx_lock(ndev);
> > 		if (netif_queue_stopped(ndev))
> > 			netif_wake_queue(ndev);
> > 		netif_tx_unlock(ndev);
> > 	}
> 
> Yes, and then you don't need that private lock in the start_xmit()
> method at all, since that method runs with the tx_lock held.

I agree that the lock should go but:
1. something must be done to prevent sh_eth_txfree() being called
   at the same time from the xmit and poll handlers
2. while netif_tx locking above provides an implicit memory barrier,
   there won't be one in sh_eth_start_xmit once the lock is removed.
   mdp->dirty_tx changes may thus go unnoticed in sh_eth_start_xmit

-- 
Ueimor
--
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