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] [day] [month] [year] [list]
Message-ID: <1328134670.2541.19.camel@bwh-desktop>
Date:	Wed, 1 Feb 2012 22:17:50 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Krishna Gudipati <kgudipat@...cade.com>
CC:	"'davem@...emloft.net'" <davem@...emloft.net>,
	"'netdev@...r.kernel.org'" <netdev@...r.kernel.org>,
	Adapter Linux Open SRC Team 
	<adapter_linux_open_src_team@...cade.COM>
Subject: RE: [PATCH] bna: Implement ethtool flash_device entry point.

On Wed, 2012-02-01 at 14:10 -0800, Krishna Gudipati wrote:
> Thanks Ben for the review.
> 
> I am making the changes as per the review comments to return proper error code.
> 
> > +	init_completion(&fcomp.comp);
> > +	spin_lock_irqsave(&bnad->bna_lock, flags);
> 
> No need to save flags, this is not called in IRQ context!
> 
> [Krishna]: bna_lock is used in Interrupt context as well, by using spin_lock_irq instead of
> 	     spin_lock_irqsave() - we will lose the state of the interrupts & will
> 	     unconditionally enable interrupts. We plan to stay with using spin_lock_irqsave()
> 	     as it's safe.

bnad_flash_device() will be called in process context, therefore it is
correct to unconditionally enable interrupts.  It is safe but odd to use
spin_lock_irqsave()/spin_lock_irqrestore() in such a function.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

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