Re: [PATCH] gpiolib: improve the robustness of watch/unwatch ioctl()

From: Linus Walleij
Date: Thu Apr 16 2020 - 07:37:33 EST


On Wed, Apr 15, 2020 at 10:24 AM Bartosz Golaszewski <brgl@xxxxxxxx> wrote:

> From: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
>
> This makes the new ioctl() a bit more robust - we now check if a line
> is already being watched and return -EBUSY if the user-space tries to
> start watching it again. Same for unwatch - return -EBUSY if user-space
> tries to unwatch a line that's not being watched.
>
> Fixes: 51c1064e82e7 ("gpiolib: add new ioctl() for monitoring changes in line info")
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>

Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

I expect that you send me a pull request with some GPIO fixes
when you feel you have some stuff including this I should send
upstream, thanks!

Yours,
Linus Walleij