mkdir, mkfifo and mknod set the process umask directly around a syscall and restore it afterwards. Overlapping calls can restore each other's value and leave the wrong umask, and a panic between the set and the restore leaks the temporary mask into the rest of the run. mkdir also reads the umask before that window, so the mask it derives can be stale.
mkdir,mkfifoandmknodset the process umask directly around a syscall and restore it afterwards. Overlapping calls can restore each other's value and leave the wrong umask, and a panic between the set and the restore leaks the temporary mask into the rest of the run.mkdiralso reads the umask before that window, so the mask it derives can be stale.