public inbox for linux-gpio@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] gpiolib: cdev: can't read RELEASED event for last line
@ 2023-05-25  3:09 Kent Gibson
  2023-05-25  7:09 ` Kent Gibson
  0 siblings, 1 reply; 6+ messages in thread
From: Kent Gibson @ 2023-05-25  3:09 UTC (permalink / raw)
  To: brgl; +Cc: linux-gpio

Hi Bart,

In testing I'm finding that I can't read the RELEASED event from the
chip fd when the last line on the chip is released.
The chip fd becomes readable, but when I try to read it I get ENODEV.

I suspect this change is the likely culprit:

533aae7c94db gpiolib: cdev: fix NULL-pointer dereferences

@@ -2425,6 +2449,9 @@ static ssize_t lineinfo_watch_read(struct file *file, char __user *buf,
        int ret;
        size_t event_size;

+       if (!cdev->gdev->chip)
+               return -ENODEV;
+

though I haven't bisected it yet to be sure.

Btw, that is testing on 6.4.0-rc3 mainline.

Cheers,
Kent.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-26  6:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-25  3:09 [BUG] gpiolib: cdev: can't read RELEASED event for last line Kent Gibson
2023-05-25  7:09 ` Kent Gibson
2023-05-25  7:46   ` Kent Gibson
2023-05-25 13:21     ` Kent Gibson
2023-05-26  0:45       ` Kent Gibson
2023-05-26  6:51         ` Kent Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox