gpio: cdev: bail out of poll() if the device goes down
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest6 patches 12 repliesIn review
- v15 patches 6 repliesSuperseded
Changes in v2 from the cover letter
- not much is left from v1, this time we don't repurpose the existing gpio_device notifier but add a new one so that cdev structures don't get unwanted events
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | gpiolib: rename the gpio_device notifierdrivers/ drivers/ drivers/ | +14 | 0 replies | |
| 2/6 | gpio: cdev: open-code to_gpio_chardev_data()drivers/ | +3 | 1 reply | |
| 3/6 | gpiolib: add a second blocking notifier to struct gpio_devicedrivers/ drivers/ drivers/ | +5 | 0 replies | |
| 4/6 | gpio: cdev: wake up chardev poll() on device unbinddrivers/ | +27 | 4 replies | |
| 5/6 | gpio: cdev: wake up linereq poll() on device unbinddrivers/ | +23 | 0 replies | |
| 6/6 | gpio: cdev: wake up lineevent poll() on device unbinddrivers/ | +22 | 0 replies |
Reviews trailers per patch
None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Kent Gibson | Linus Walleij |
|---|---|---|
| Series | R-b | R-b |
| 1/6 | ||
| 2/6 | ||
| 3/6 | ||
| 4/6 | ||
| 5/6 | ||
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/6] gpio: cdev: bail out of poll() if the device goes down
From: Bartosz Golaszewski <[email protected]>
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.
v1 -> v2:
- not much is left from v1, this time we don't repurpose the existing gpio_device notifier but add a new one so that cdev structures don't get unwanted events
Bartosz Golaszewski (6):
gpiolib: rename the gpio_device notifier
gpio: cdev: open-code to_gpio_chardev_data()
gpiolib: add a second blocking notifier to struct gpio_device
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 | 101 ++++++++++++++++++++++++++++++------ drivers/gpio/gpiolib.c | 7 +-- drivers/gpio/gpiolib.h | 9 ++-- 3 files changed, 94 insertions(+), 23 deletions(-)
Signature · 1 line
2.39.2