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: <CACRpkdbWd70EM0azZhhmi9nyi6D1QHAWXqHkh5r-PRsmvzKXKQ@mail.gmail.com>
Date:	Mon, 17 Aug 2015 10:56:18 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Alexandre Courbot <acourbot@...dia.com>
Cc:	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	ldv-project@...uxtesting.org, Alexandre Courbot <gnurou@...il.com>,
	Alexey Khoroshilov <khoroshilov@...ras.ru>,
	Andreas Larsson <andreas@...sler.com>
Subject: Re: [PATCH] gpio/grgpio: fix deadlock in grgpio_irq_unmap()

On Mon, Aug 17, 2015 at 10:23 AM, Alexandre Courbot <acourbot@...dia.com> wrote:

> As reported by Alexey Khoroshilov:
>
>     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.
>
> Fix this by moving the spinlock acquisition outside of
> grgpio_set_imask().
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Reported-by: Alexey Khoroshilov <khoroshilov@...ras.ru>
> Signed-off-by: Alexandre Courbot <acourbot@...dia.com>
> CC: Alexey Khoroshilov <khoroshilov@...ras.ru>
> CC: Andreas Larsson <andreas@...sler.com>

Patch applied.

Yours,
Linus Walleij
--
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