Re: kq_lock is required when updating kn_status

2021-06-15 Thread Visa Hankala
On Mon, Jun 14, 2021 at 11:44:15PM +0200, Martin Pieuchot wrote: > On 14/06/21(Mon) 13:45, Visa Hankala wrote: > > When a knote's kn_status is updated, it is necessary to lock the kqueue > > that owns the knote, to ensure proper serialization. filt_proc() has > > a mistake in this, and the

Re: kq_lock is required when updating kn_status

2021-06-14 Thread Martin Pieuchot
On 14/06/21(Mon) 13:45, Visa Hankala wrote: > When a knote's kn_status is updated, it is necessary to lock the kqueue > that owns the knote, to ensure proper serialization. filt_proc() has > a mistake in this, and the following diff fixes it. The fix is here to ensure `kn_status' cannot be

kq_lock is required when updating kn_status

2021-06-14 Thread Visa Hankala
When a knote's kn_status is updated, it is necessary to lock the kqueue that owns the knote, to ensure proper serialization. filt_proc() has a mistake in this, and the following diff fixes it. proc_filtops is MP-unsafe and all its callbacks run with the kernel locked. The kernel lock should