lkml.org 
[lkml]   [2023]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/5] gpio: cdev: bail out of poll() if the device goes down
Date
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Wake up all three wake queues (the one associated with the character
device file, the one for V1 line events and the V2 line request one)
when the underlying GPIO device is unregistered. This way we won't get
stuck in poll() after the chip is gone as user-space will be forced to
go back into a new system call and will see that gdev->chip is NULL.

Bartosz Golaszewski (5):
gpio: cdev: ignore notifications other than line status changes
gpio: cdev: rename the notifier block and notify callback
gpio: cdev: wake up chardev poll() on device unbind
gpio: cdev: wake up linereq poll() on device unbind
gpio: cdev: wake up lineevent poll() on device unbind

drivers/gpio/gpiolib-cdev.c | 127 +++++++++++++++++++++++++++++-------
drivers/gpio/gpiolib.h | 3 +-
2 files changed, 105 insertions(+), 25 deletions(-)

--
2.39.2

\
 
 \ /
  Last update: 2023-08-16 14:21    [W:0.224 / U:1.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site