Re: [PATCH v1 1/1] gpiolib: sysfs: Do unexport GPIO when user asks for it

From: Linus Walleij
Date: Wed Aug 16 2023 - 17:34:35 EST


On Mon, Aug 14, 2023 at 1:19 PM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

> It seems that sysfs interface implicitly relied on the gpiod_free()
> to unexport the line. This is not good and prone to regressions.
> Fix it by explicitly calling gpiod_unexport().
>
> Fixes: b0ce9ce408b6 ("gpiolib: Do not unexport GPIO on freeing")
> Reported-by: Marek Behún <kabel@xxxxxxxxxx>
> Closes: https://lore.kernel.org/r/20230808102828.4a9eac09@dellmb
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Tested-by: Marek Behún <kabel@xxxxxxxxxx>

Late to the show so patch already applied, but THANKS for
drilling into it and smoking out this bug Andy.

Yours,
Linus Walleij