From: Grant Likely <grant.likely@secretlab.ca>
To: Stephen Warren <swarren@wwwdotorg.org>,
Rob Herring <rob.herring@calxeda.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-rt-users@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org,
linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org,
Sam Ravnborg <sam@ravnborg.org>,
linux-next@vger.kernel.org, Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH] of: fix recursive locking in of_get_next_available_child()
Date: Mon, 11 Feb 2013 22:39:07 +0000 [thread overview]
Message-ID: <20130211223907.271653E3530@localhost> (raw)
In-Reply-To: <1360617332-2738-1-git-send-email-swarren@wwwdotorg.org>
On Mon, 11 Feb 2013 14:15:32 -0700, Stephen Warren <swarren@wwwdotorg.org> wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> of_get_next_available_child() acquires devtree_lock, then calls
> of_device_is_available() which calls of_get_property() which calls
> of_find_property() which tries to re-acquire devtree_lock, thus causing
> deadlock.
>
> To avoid this, create a new __of_device_is_available() which calls
> __of_get_property() instead, which calls __of_find_property(), which
> does not take the lock,. Update of_get_next_available_child() to call
> the new __of_device_is_available() since it already owns the lock.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Thanks for looking at this Stephen. I ended up applying my version of
this patch though just because it was more convenient to do so. It was
pretty much identical anyway.
g.
prev parent reply other threads:[~2013-02-11 22:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-11 21:15 [PATCH] of: fix recursive locking in of_get_next_available_child() Stephen Warren
2013-02-11 21:15 ` Stephen Warren
2013-02-11 22:39 ` Grant Likely [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130211223907.271653E3530@localhost \
--to=grant.likely@secretlab.ca \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=rob.herring@calxeda.com \
--cc=sam@ravnborg.org \
--cc=sparclinux@vger.kernel.org \
--cc=swarren@nvidia.com \
--cc=swarren@wwwdotorg.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.