Re: [PATCH] gpio: cdev: make sure the cdev fd is still active before emitting events

From: Bartosz Golaszewski

Date: Wed Nov 19 2025 - 06:03:57 EST


From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>


On Mon, 17 Nov 2025 16:08:42 +0100, Bartosz Golaszewski wrote:
> With the final call to fput() on a file descriptor, the release action
> may be deferred and scheduled on a work queue. The reference count of
> that descriptor is still zero and it must not be used. It's possible
> that a GPIO change, we want to notify the user-space about, happens
> AFTER the reference count on the file descriptor associated with the
> character device went down to zero but BEFORE the .release() callback
> was called from the workqueue and so BEFORE we unregistered from the
> notifier.
>
> [...]

Applied, thanks!

[1/1] gpio: cdev: make sure the cdev fd is still active before emitting events
https://git.kernel.org/brgl/linux/c/d4cd0902c156b2ca60fdda8cd8b5bcb4b0e9ed64

Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>