From: Alexandre Courbot <gnurou@gmail.com>
To: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Andreas Larsson <andreas@gaisler.com>,
Linus Walleij <linus.walleij@linaro.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
ldv-project@linuxtesting.org
Subject: Re: Deadlock in grgpio_irq_unmap()
Date: Mon, 17 Aug 2015 17:24:19 +0900 [thread overview]
Message-ID: <CAAVeFuKFZ3pyC--K3y57GQRkXyGGRmCLA2rLDbVBLNAXd53jnw@mail.gmail.com> (raw)
In-Reply-To: <1438532122-25368-1-git-send-email-khoroshilov@ispras.ru>
On Mon, Aug 3, 2015 at 1:15 AM, Alexey Khoroshilov
<khoroshilov@ispras.ru> wrote:
> Dear colleagus,
>
> grgpio_irq_unmap() code looks quite suspicious regarding usage of
> priv->bgc.lock spinlock.
>
> It locks the spinlock in line 310:
> spin_lock_irqsave(&priv->bgc.lock, flags);
> and then it can call grgpio_set_imask() in line 317:
> grgpio_set_imask(priv, i, 0);
>
> But grgpio_set_imask() unconditionally locks the spinlock by itself.
Indeed, this looks plain wrong. I have sent a fix that moves the
spinlock acquisition outside of grgpio_set_imask().
prev parent reply other threads:[~2015-08-17 8:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-02 16:15 Deadlock in grgpio_irq_unmap() Alexey Khoroshilov
2015-08-17 8:24 ` Alexandre Courbot [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=CAAVeFuKFZ3pyC--K3y57GQRkXyGGRmCLA2rLDbVBLNAXd53jnw@mail.gmail.com \
--to=gnurou@gmail.com \
--cc=andreas@gaisler.com \
--cc=khoroshilov@ispras.ru \
--cc=ldv-project@linuxtesting.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).