Thread (17 messages) flat view 17 messages, 8 authors, 2021-03-08

Re: [RFC PATCH] fs: introduce mkdirat2 syscall for atomic mkdir

From: Drew DeVault <hidden>
Date: 2021-02-28 13:58:19
Also in: linux-fsdevel

On Sat Feb 27, 2021 at 11:03 PM EST, Matthew Wilcox wrote:
quoted
1. Program A creates a directory
2. Program A is pre-empted
3. Program B deletes the directory
4. Program A creates a file in that directory
5. RIP
umm ... program B deletes the directory. program A opens it in order to
use openat(). program A gets ENOENT and exits, confused. that's the
race you're removing here -- and it seems fairly insignificant to me.
Yes, that is the race being eliminated here. Instead of this, program A
has an fd which holds a reference to the directory, so it just works. A
race is a race. It's an oversight in the API.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help