This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/14942] File corruption bug in AIO with close()


http://sourceware.org/bugzilla/show_bug.cgi?id=14942

--- Comment #3 from Rich Felker <bugdal at aerifal dot cx> ---
Open is not the only way a file descriptor can be obtained; generating the
unique id at each fd-creation seems almost impossible. For example, an fd can
be inherited across exec, or could be passed over a unix socket or fifo, or
could come to exist from a multitude of syscalls.

Also, I think my F_DUPFD_CLOEXEC approach is flawed in that it breaks fcntl
locking. Closing the duplicate file descriptor will release any locks on the
original file descriptor due to the idiotic design of fcntl locking...

I do see a possible new approach to AIO: have AIO threads call
unshare(CLONE_FILES) so that calling close from elsewhere in the program cannot
affect the pending AIO operations.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]