diff options
| author | Eric Blake | 2020-04-20 19:53:08 +0200 |
|---|---|---|
| committer | Eric Blake | 2020-05-04 21:54:35 +0200 |
| commit | 474a6e64f2c3c17718b853b9d70e054ee8d26f37 (patch) | |
| tree | 2cf2b2a0a8e525a7a82a7d2e8c329ef8f0c67672 /tests | |
| parent | Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (diff) | |
| download | qemu-474a6e64f2c3c17718b853b9d70e054ee8d26f37.tar.gz qemu-474a6e64f2c3c17718b853b9d70e054ee8d26f37.tar.xz qemu-474a6e64f2c3c17718b853b9d70e054ee8d26f37.zip | |
tools: Fix use of fcntl(F_SETFD) during socket activation
Blindly setting FD_CLOEXEC without a read-modify-write will
inadvertently clear any other intentionally-set bits, such as a
proposed new bit for designating a fd that must behave in 32-bit mode.
However, we cannot use our wrapper qemu_set_cloexec(), because that
wrapper intentionally abort()s on failure, whereas the probe here
intentionally tolerates failure to deal with incorrect socket
activation gracefully. Instead, fix the code to do the proper
read-modify-write.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200420175309.75894-3-eblake@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions
