linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jon.medhurst@linaro.org (Jon Medhurst (Tixy))
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmc: mmci: Do not release spinlock in request_end
Date: Thu, 13 Oct 2011 16:59:52 +0100	[thread overview]
Message-ID: <1318521592.2090.16.camel@linaro1> (raw)
In-Reply-To: <20111013142914.GZ21648@n2100.arm.linux.org.uk>

On Thu, 2011-10-13 at 15:29 +0100, Russell King - ARM Linux wrote:
> On Tue, Oct 11, 2011 at 04:06:41PM +0200, Ulf Hansson wrote:
> > The patch "mmc: core: move ->request() call from atomic context",
> > is the reason to why this change is possible. This simplifies the
> > error handling code execution path quite a lot and potentially also
> > fixes some error handling hang problems.
> > 
> > Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
> 
> This doesn't look right:
> 
> void mmc_request_done(struct mmc_host *host, struct mmc_request *mrq)
> {
>         if (err && cmd->retries) {
>                 host->ops->request(host, mrq);
> 
> So, not dropping the spinlock results in calling the request function
> with the spinlock held - and as the request function then goes on to
> lock the spinlock, we will deadlock.

Indeed, deadlock behaviour at this point is what I see with this patch
on a Versatile Express board running 3.0-rc9.

-- 
Tixy

  reply	other threads:[~2011-10-13 15:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-11 14:06 [PATCH] mmc: mmci: Do not release spinlock in request_end Ulf Hansson
2011-10-12  9:41 ` Linus Walleij
2011-10-12 10:33   ` Adrian Hunter
2011-10-13 14:29 ` Russell King - ARM Linux
2011-10-13 15:59   ` Jon Medhurst (Tixy) [this message]
2011-10-14  7:37     ` Ulf Hansson
2011-10-14  7:42       ` Russell King - ARM Linux
2011-10-14  7:51         ` Ulf Hansson
2011-10-14  8:03           ` Russell King - ARM Linux
2011-10-14  8:22             ` Ulf Hansson
2011-10-16 20:34               ` Linus Walleij

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=1318521592.2090.16.camel@linaro1 \
    --to=jon.medhurst@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).