From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: [Bug report] dead lock is occur in mutex_trylock
Date: Mon, 08 Dec 2008 07:59:47 +0000 [thread overview]
Message-ID: <20081208075946.GB14767@linux-sh.org> (raw)
In-Reply-To: <uej0jyw3m.wl%morimoto.kuninori@renesas.com>
On Mon, Dec 08, 2008 at 04:53:53PM +0900, morimoto.kuninori@renesas.com wrote:
>
> Dear Paul
>
> > > It works well if I use old ${LINUX}/arch/sh/include/asm/mutex-llsc.h,
> > > But, latest mutex-llsc.h seems cause dead lock on __mutex_fastpath_trylock.
> > >
> > > It confirmed on AP325 board.
> > >
> > Do you have a test case that can reproduce this?
>
> I'm using latest linux-sh git and normal AP325 defconfig.
> you can get dead lock when kernel starts MTD setting.
>
It helps if I'm using the right configuration, whoops.
This ought to do it..
---
diff --git a/arch/sh/include/asm/mutex-llsc.h b/arch/sh/include/asm/mutex-llsc.h
index a91990c..ee839ee 100644
--- a/arch/sh/include/asm/mutex-llsc.h
+++ b/arch/sh/include/asm/mutex-llsc.h
@@ -73,7 +73,7 @@ __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *))
: "t");
__res |= !__ex_flag;
- if (unlikely(__res != 0))
+ if (unlikely(__res <= 0))
fail_fn(count);
}
next prev parent reply other threads:[~2008-12-08 7:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-08 7:17 [Bug report] dead lock is occur in mutex_trylock morimoto.kuninori
2008-12-08 7:30 ` Paul Mundt
2008-12-08 7:53 ` morimoto.kuninori
2008-12-08 7:56 ` Nobuhiro Iwamatsu
2008-12-08 7:59 ` Paul Mundt [this message]
2008-12-08 8:14 ` morimoto.kuninori
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=20081208075946.GB14767@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=linux-sh@vger.kernel.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 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.