Update locking code based on origin/main

Pulled most recent updates on unix/socket.c from origin/main, it seems
this issue was already handled by those updates.
42 jobs for !3775 with 1484-threadsanitizer-data-race-in-epoll_ctl in 2 minutes and 41 seconds (queued for 4 seconds)
merge request