lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAVeFuKFZ3pyC--K3y57GQRkXyGGRmCLA2rLDbVBLNAXd53jnw@mail.gmail.com>
Date:	Mon, 17 Aug 2015 17:24:19 +0900
From:	Alexandre Courbot <gnurou@...il.com>
To:	Alexey Khoroshilov <khoroshilov@...ras.ru>
Cc:	Andreas Larsson <andreas@...sler.com>,
	Linus Walleij <linus.walleij@...aro.org>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	ldv-project@...uxtesting.org
Subject: Re: Deadlock in grgpio_irq_unmap()

On Mon, Aug 3, 2015 at 1:15 AM, Alexey Khoroshilov
<khoroshilov@...ras.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().
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ