Open khuey opened 4 years ago
The fix here might be to wait for the outstanding open(2) to complete before allowing the unshare(2) to move forward.
Doing this could cause deadlocks in contrived cases, e.g. if open
opens a FIFO, but the other end is opened by the unshare
thread after the unshare
.
A similar race to the one handled in ac321e492e3c517ee5a26d990271728c55a732c7, if a task is descheduled in an open(2) and another task sharing its
FdTable
unshares we may not pick up the correct state of theFdTable
when we clone it.The fix here might be to wait for the outstanding open(2) to complete before allowing the unshare(2) to move forward.