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:   Thu, 8 Dec 2016 16:46:11 +0100
From:   Pavel Machek <pavel@....cz>
To:     David Miller <davem@...emloft.net>
Cc:     LinoSanfilippo@....de, bh74.an@...sung.com, ks.giri@...sung.com,
        vipul.pandya@...sung.com, peppe.cavallaro@...com,
        alexandre.torgue@...com, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH 2/2] net: ethernet: stmmac: remove private tx queue lock

On Thu 2016-12-08 10:26:41, David Miller wrote:
> From: Pavel Machek <pavel@....cz>
> Date: Thu, 8 Dec 2016 15:08:46 +0100
> 
> > On Wed 2016-12-07 18:41:11, David Miller wrote:
> >> From: Pavel Machek <pavel@....cz>
> >> Date: Wed, 7 Dec 2016 22:37:57 +0100
> >> 
> >> > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> >> > index 982c952..7415bc2 100644
> >> > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> >> > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> >> > @@ -1308,7 +1308,7 @@ static void stmmac_tx_clean(struct stmmac_priv *priv)
> >> >  	unsigned int bytes_compl = 0, pkts_compl = 0;
> >> >  	unsigned int entry = priv->dirty_tx;
> >> >  
> >> > -	spin_lock(&priv->tx_lock);
> >> > +	netif_tx_lock_bh(priv->dev);
> >> >  
> >> >  	priv->xstats.tx_clean++;
> >> >  
> >> 
> >> stmmac_tx_clean() runs from either the timer or the NAPI poll handler,
> >> both execute from software interrupts, therefore _bh() should be
> >> unnecessary.
> > 
> > I've tried the test again with netif_tx_lock() (not _bh()) and it
> > survived for more then four hours. Strange...
> 
> It's not strange, it's completely expected.

Well, I tried that exact test before, and it survived for something
like 10 minutes. So yes... this surprised me.
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ