Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys



Module Name:    src
Committed By:   thorpej
Date:           Sun Sep 26 21:29:39 UTC 2021

Modified Files:
        src/sys/kern: kern_event.c vfs_init.c vfs_syscalls.c
        src/sys/sys: event.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/kern/kern_event.c
cvs rdiff -u -r1.52 -r1.53 src/sys/kern/vfs_init.c
cvs rdiff -u -r1.552 -r1.553 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.42 -r1.43 src/sys/sys/event.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index