[PATCH] of: Fix locking when calling of_get_next_available_child()

Thierry Reding thierry.reding at avionic-design.de
Wed Feb 13 02:20:37 EST 2013


On Mon, Feb 11, 2013 at 04:26:46PM -0700, Stephen Warren wrote:
> On 02/11/2013 03:19 PM, Grant Likely wrote:
> > of_get_next_available_child() obtains the devtree_lock and then calls
> > of_device_is_available() which also attempts to claim the lock. This is
> > obviously incorrect and causes a deadlock on boot. Fix issue by adding
> > an variant of of_device_is_available() which doesn't obtain the lock.
> 
> This patch forgets to update __of_device_is_available() to call
> __of_get_property() rather than of_get_property() and hence doesn't
> actually solve the problem.

Yes, please. of_get_property() called from __of_device_is_available()
pretty much defeats the purpose of having the non-locked version.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20130212/7b96270e/attachment.sig>


More information about the devicetree-discuss mailing list