CVSROOT:        /cvs
Module name:    src
Changes by:     v...@cvs.openbsd.org    2021/01/26 19:58:03

Modified files:
        sys/kern       : kern_event.c 

Log message:
kqueue: Fix termination assert

When a kqueue file is closed, the kqueue can still have threads
scanning it. Consequently, kqueue_terminate() can see scan markers
in the event queue. These markers are removed when the scanning threads
leave the kqueue. Take this into account when checking the queue's
state, to avoid a panic when kqueue is closed from under a thread.

OK anton@

Reported-by: syzbot+757c60a2aa1125137...@syzkaller.appspotmail.com

Reply via email to