Re: [PATCH 0/2] fix fcntl(F_SETFD) usage

2020-04-20 Thread Peter Maydell
On Mon, 20 Apr 2020 at 18:53, Eric Blake wrote: > > As recently pointed out: > https://lists.gnu.org/archive/html/qemu-devel/2020-04/msg03133.html > code that blindly calls fcntl(fd, F_SETFD, 1) rather than performing a > read-modify-write when it intends to add FD_CLOEXEC is broken, in that > it

[PATCH 0/2] fix fcntl(F_SETFD) usage

2020-04-20 Thread Eric Blake
As recently pointed out: https://lists.gnu.org/archive/html/qemu-devel/2020-04/msg03133.html code that blindly calls fcntl(fd, F_SETFD, 1) rather than performing a read-modify-write when it intends to add FD_CLOEXEC is broken, in that it can inadvertently clear other bits. Thankfully, the culprits