Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1208478
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] gpio/grgpio: fix deadlock in grgpio_irq_unmap() |
| Date | 2015-08-17 11:00 +0200 |
| Message-ID | <pYoqS-2nw-11@gated-at.bofh.it> (permalink) |
| References | <pYnXR-1P5-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Aug 17, 2015 at 10:23 AM, Alexandre Courbot <acourbot@nvidia.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@ispras.ru> > Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> > CC: Alexey Khoroshilov <khoroshilov@ispras.ru> > CC: Andreas Larsson <andreas@gaisler.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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] gpio/grgpio: fix deadlock in grgpio_irq_unmap() Alexandre Courbot <acourbot@nvidia.com> - 2015-08-17 10:30 +0200 Re: [PATCH] gpio/grgpio: fix deadlock in grgpio_irq_unmap() Linus Walleij <linus.walleij@linaro.org> - 2015-08-17 11:00 +0200
csiph-web