summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2020-01-03 05:37:01 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2020-01-03 05:37:01 +0000
commit3ac4a2f623c16e7c9121ca6b05af56ae167dfdfd (patch)
treec6e89fbbb82c7ee79e1e73b1110fedb08cf4c58f /usr.bin
parentbb28214186b86f2b49da295e99e6ab0513cfa16c (diff)
Fix a file descriptor close race in kqueue_register()
After inserting a knote, check that the associated file descriptor still references the same file. Remove the knote if the descriptor has changed because otherwise the kqueue becomes inconsistent with the file descriptor table. There is an analogous race in fcntl(F_SETLK). It is already handled, but the code can be simplified by using the same check as in kqueue_register(). Fix inspired by DragonFly BSD OK mpi@, anton@
Diffstat (limited to 'usr.bin')
0 files changed, 0 insertions, 0 deletions