Hi,
After reading the fcntl(2) code I cannot spot anything obvious
preventing it from being unlocked[1]. This is all made possible by the
recent MP-safe effort including resource limits, atomic file flags,
ioctl unlock and posix file locks.
I've been running with this for a week by now. However, testing is much
appreciated. Remember to run `make -C sys/kern syscalls' after applying
the diff.
Comments? OK?
[1] The same is also true for flock(2) but one step at a time.
Index: kern/syscalls.master
===================================================================
RCS file: /cvs/src/sys/kern/syscalls.master,v
retrieving revision 1.205
diff -u -p -r1.205 syscalls.master
--- kern/syscalls.master 22 Feb 2020 12:00:24 -0000 1.205
+++ kern/syscalls.master 4 Mar 2020 20:05:30 -0000
@@ -203,7 +203,7 @@
90 STD NOLOCK { int sys_dup2(int from, int to); }
91 STD NOLOCK { int sys_nanosleep(const struct timespec *rqtp, \
struct timespec *rmtp); }
-92 STD { int sys_fcntl(int fd, int cmd, ... void *arg); }
+92 STD NOLOCK { int sys_fcntl(int fd, int cmd, ... void *arg); }
93 STD { int sys_accept4(int s, struct sockaddr *name, \
socklen_t *anamelen, int flags); }
94 STD NOLOCK { int sys___thrsleep(const volatile void *ident, \