summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_time.c
diff options
context:
space:
mode:
authorart <art@openbsd.org>2008-09-19 12:24:55 +0000
committerart <art@openbsd.org>2008-09-19 12:24:55 +0000
commitbb08c569828da634b782784149c2d0ffde9e1212 (patch)
tree94d6ccc8e8cbb21626efb66e63e67645274e1b47 /sys/kern/kern_time.c
parentAES with keysize != 128 bit is not supported in hardware, so we need (diff)
downloadwireguard-openbsd-bb08c569828da634b782784149c2d0ffde9e1212.tar.xz
wireguard-openbsd-bb08c569828da634b782784149c2d0ffde9e1212.zip
Fix a bunch of problems and races with posix file locking.
- file descriptor table becomes the owner of the lock instead of the proc. - When grabbing the lock, we check if the fd hasn't changed under our feet, this is more or less impossible to solve without a hack like this. I've banged my head against the wall, I figured out a solution, but implementing it correctly would cost me 12 gray hairs. Screw it, this is ugly, but it works. - Wait until usecount drains before releasing the posix lock in closef. - Add missing FREF/FRELE to sys_flock - keep the pid in the flock struct instead of abusing the fact that we used to use the proc as the lock owner. Pointed out by and discussed with Al Viro, big thanks. miod@ ok
Diffstat (limited to 'sys/kern/kern_time.c')
0 files changed, 0 insertions, 0 deletions