OpenBSD cvs log

created 2020-02-07T01:08:16Z
begin 2020-01-18T00:00:00Z
end 2020-01-19T00:00:00Z
path src/sys
commits 3

date 2020-01-18T08:40:19Z
author visa
files src/sys/kern/vfs_syscalls.c log diff annotate
src/sys/sys/mount.h log diff annotate
message Clear mount operation argument flags from mnt_flag after mount.

OK bluhm@

date 2020-01-18T08:59:48Z
author visa
files src/sys/kern/kern_event.c log diff annotate
message Make klist_invalidate() more careful and general. Acquire knotes before
changing them, to synchronize with kqueue_register() and kqueue_scan().
Detach the knotes from the original knote list, change the filterops
to one that always indicates EOF condition, and activate in one-shot

The detaching allows the original knote list head to be deleted after
klist_invalidate() returns. The knotes are activated to make the EOF
condition visible to the event subscribers as soon as possible. As the
knotes are detached from the list, klist_invalidate() does not have to
wait for userspace to process them.

The use of the special filterops minimizes the need to handle klist
invalidation in actual implementations of filterops.

Tested by Greg Steuck
OK mpi@

date 2020-01-18T09:00:52Z
author visa
files src/sys/dev/usb/uhid.c log diff annotate
message Invalidate knote list of uhid(4) after device detach. This prevents
a crash that can happen if a uhid(4) device is detached while kqueue
still holds references to knotes that point to the device.

The invalidation has to be done after vdevgone(). This order ensures
that the file descriptors return an error or EOF when kevent(2) returns
the EOF events.

Crash reported and fix tested by Greg Steuck
OK mpi@