kqueue: kq_lock is needed when updating kn_status
authorvisa <visa@openbsd.org>
Wed, 16 Jun 2021 14:26:30 +0000 (14:26 +0000)
committervisa <visa@openbsd.org>
Wed, 16 Jun 2021 14:26:30 +0000 (14:26 +0000)
commit627c97d9222ce740183124bc06e26a24c28a3a30
tree3eef87ad992917446b28b2b1efd5dfc90ba4d12d
parentea86c963412ecba44eaf8ac11acb42ca3989f977
kqueue: kq_lock is needed when updating kn_status

The kn_status field of struct knote is part of kqueue's internal state.
When kn_status is being updated, kq_lock has to be locked. This is true
even with MP-unsafe event filters.

OK mpi@
sys/kern/kern_event.c
sys/sys/event.h