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: <20130401132407.GL18636@opensource.wolfsonmicro.com>
Date:	Mon, 1 Apr 2013 14:24:08 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Doug Anderson <dianders@...omium.org>
Cc:	Grant Likely <grant.likely@...retlab.ca>,
	Linus Walleij <linus.walleij@...aro.org>,
	Olof Johansson <olof@...om.net>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Bryan Freed <bfreed@...omium.org>,
	spi-devel-general@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Subject: Re: [REPOST PATCH] spi: Unlock a spinlock before calling into the
 controller driver.

On Wed, Mar 13, 2013 at 11:17:40AM -0700, Doug Anderson wrote:
> From: Bryan Freed <bfreed@...omium.org>
> 
> spi_pump_messages() calls into a controller driver with
> unprepare_transfer_hardware() which is documented as "This may sleep".
> As in the prepare_transfer_hardware() call below, we should release the
> queue_lock spinlock before making the call.
> Rework the logic a bit to hold queue_lock to protect the 'busy' flag,
> then release it to call unprepare_transfer_hardware().

Applied, thanks.  However...

>  		spin_unlock_irqrestore(&master->queue_lock, flags);
> +		if (master->unprepare_transfer_hardware &&
> +		    master->unprepare_transfer_hardware(master))
> +			dev_err(&master->dev,
> +				"failed to unprepare transfer hardware\n");

...it'd be nicer to pay attention to and log the error code if we fail
to unprepare.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ