--- - branch: MAIN date: Sun Sep 26 21:29:39 UTC 2021 files: - new: '1.124' old: '1.123' path: src/sys/kern/kern_event.c pathrev: src/sys/kern/kern_event.c@1.124 type: modified - new: '1.53' old: '1.52' path: src/sys/kern/vfs_init.c pathrev: src/sys/kern/vfs_init.c@1.53 type: modified - new: '1.553' old: '1.552' path: src/sys/kern/vfs_syscalls.c pathrev: src/sys/kern/vfs_syscalls.c@1.553 type: modified - new: '1.43' old: '1.42' path: src/sys/sys/event.h pathrev: src/sys/sys/event.h@1.43 type: modified id: 20210926T212939Z.03bb89ceda6f88fa2752d6d91d6383091e43701e log: | Fix the locking around EVFILT_FS. Previously, the code would walk the fs_klist and take the kqueue_misc_lock inside the event callback. However, that list can be modified by the attach and detach callbacks, which could result in the walker stepping right off a cliff. Instead, we give the fs_klist it's own lock, and hold it while we call knote(), using the NOTE_SUBMIT protocol. Also, fs_filtops into vfs_syscalls.c so all of the locking logic is contained in one file (there is precedence with sig_filtops). fs_filtops is now marked MPSAFE. module: src subject: 'CVS commit: src/sys' unixtime: '1632691779' user: thorpej