From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: [bug report] dead lock (?) occur on ap325 board
Date: Tue, 27 Jan 2009 08:32:31 +0000 [thread overview]
Message-ID: <20090127083231.GA7407@linux-sh.org> (raw)
In-Reply-To: <uprie4cmj.wl%morimoto.kuninori@renesas.com>
On Tue, Jan 27, 2009 at 05:26:46PM +0900, morimoto.kuninori@renesas.com wrote:
>
> Dear Paul
>
> > I haven't been able to reproduce this yet, but it would be helpful to
> > know precisely where your lock up occurs. If you aren't using JTAG, you
> > can try sending an NMI, or send a register and/or stacktrace request via
> > magic sysrq.
>
> I think I found the reason.
>
> in "__mutex_fastpath_unlock" (arch/sh/include/asm/mutex-llsc.h),
> currect operation is following.
>
> -------------------
> __res |= !__ex_flag;
> if (unlikely(__res <= 0))
> -------------------
>
> But, This operation is wrong for me.
> I think following is correct ?
>
> -------------------
> if (unlikely(__res <= 0 || __ex_flag = 0))
> -------------------
>
> above patch works well and dead lock never occur
> on my local environment.
> If my opinion is correct, I will send patch.
>
Hmm, the !__ex_flag should have handled that case properly, but I wonder
if it is negated in the unlock case. Does switching to __res |= __ex_flag
and leaving the existing test as-is fix it?
next prev parent reply other threads:[~2009-01-27 8:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-23 9:04 [bug report] dead lock (?) occur on ap325 board morimoto.kuninori
2009-01-26 2:20 ` Paul Mundt
2009-01-26 5:01 ` morimoto.kuninori
2009-01-27 8:26 ` morimoto.kuninori
2009-01-27 8:32 ` Paul Mundt [this message]
2009-01-27 8:46 ` morimoto.kuninori
2009-01-27 8:49 ` Paul Mundt
2009-01-28 1:25 ` morimoto.kuninori
2009-01-28 9:29 ` Takashi Yoshii
2009-01-28 10:03 ` Paul Mundt
2009-01-29 0:34 ` yoshii.takashi
2009-01-29 23:54 ` 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=20090127083231.GA7407@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox