[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMpxmJUb09KGreHw6Bdz79rbnQE7oZnWg_5qN_FhzoS2-XccFA@mail.gmail.com>
Date: Tue, 14 Apr 2020 14:26:49 +0200
From: Bartosz Golaszewski <bgolaszewski@...libre.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Bartosz Golaszewski <brgl@...ev.pl>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpiolib: don't call sleeping functions with a spinlock taken
wt., 14 kwi 2020 o 14:00 Linus Walleij <linus.walleij@...aro.org> napisaĆ(a):
>
> On Fri, Mar 20, 2020 at 10:31 AM Bartosz Golaszewski <brgl@...ev.pl> wrote:
>
> > From: Bartosz Golaszewski <bgolaszewski@...libre.com>
> >
> > We must not call pinctrl_gpio_can_use_line() with the gpio_lock taken
> > as it takes a mutex internally. Let's move the call before taking the
> > spinlock and store the return value.
> >
> > This isn't perfect - there's a moment between calling
> > pinctrl_gpio_can_use_line() and taking the spinlock where the situation
> > can change but it isn't a regression either: previously this part wasn't
> > protected at all and it only affects the information user-space is
> > seeing.
> >
> > Reported-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> > Fixes: d2ac25798208 ("gpiolib: provide a dedicated function for setting lineinfo")
> > Signed-off-by: Bartosz Golaszewski <bgolaszewski@...libre.com>
>
> I'm sorry that I lost track of this patch :(
>
> Do we still need something like this or has it been fixed
> by some other patches?
>
> Yours,
> Linus Walleij
Nope, this is still an issue. Do you have a better idea than mine?
Bart
Powered by blists - more mailing lists