[Bug 289120] A time-of-check to time-of-use race exists in gpioc_kqread() of GPIO subsystem
Date: Mon, 29 Sep 2025 15:27:56 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289120 --- Comment #6 from Ahmad Khalifa <vexeduxr@FreeBSD.org> --- The priv->mtx lock is given to kqueue through knlist_init_mtx (which is called in gpioc_open). It gets locked by knlist_mtx_lock (which is a generic implementation, since we never give one to kqueue) before it calls the knote's f_event (which in our case is gpioc_kqread). As for the ioctl race, yes, that does look like an oversight. I will try to get that fixed ASAP. Thank you for the report. :) -- You are receiving this mail because: You are the assignee for the bug.