aboutsummaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-01-13 14:19:24 +0000
committerPeter Maydell <peter.maydell@linaro.org>2021-01-13 14:19:24 +0000
commit45240eed4f064576d589ea60ebadf3c11d7ab891 (patch)
tree9384e23478ab00d726eeb0a7e403f97284262933 /io
parent6b63d126121a9535784003924fcb67f574a6afc0 (diff)
parent91d48e520a4a4f72e97aeb333029694f5d57cc93 (diff)
downloadqemu-45240eed4f064576d589ea60ebadf3c11d7ab891.zip
qemu-45240eed4f064576d589ea60ebadf3c11d7ab891.tar.gz
qemu-45240eed4f064576d589ea60ebadf3c11d7ab891.tar.bz2
Merge remote-tracking branch 'remotes/armbru/tags/pull-yank-2021-01-13' into staging
Yank patches patches for 2021-01-13 # gpg: Signature made Wed 13 Jan 2021 09:25:46 GMT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-yank-2021-01-13: tests/test-char.c: Wait for the chardev to connect in char_socket_client_dupid_test io: Document qmp oob suitability of qio_channel_shutdown and io_shutdown io/channel-tls.c: make qio_channel_tls_shutdown thread-safe migration: Add yank feature chardev/char-socket.c: Add yank feature block/nbd.c: Add yank feature Introduce yank feature Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'io')
-rw-r--r--io/channel-tls.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/io/channel-tls.c b/io/channel-tls.c
index 388f019..2ae1b92 100644
--- a/io/channel-tls.c
+++ b/io/channel-tls.c
@@ -23,6 +23,7 @@
#include "qemu/module.h"
#include "io/channel-tls.h"
#include "trace.h"
+#include "qemu/atomic.h"
static ssize_t qio_channel_tls_write_handler(const char *buf,
@@ -277,7 +278,8 @@ static ssize_t qio_channel_tls_readv(QIOChannel *ioc,
return QIO_CHANNEL_ERR_BLOCK;
}
} else if (errno == ECONNABORTED &&
- (tioc->shutdown & QIO_CHANNEL_SHUTDOWN_READ)) {
+ (qatomic_load_acquire(&tioc->shutdown) &
+ QIO_CHANNEL_SHUTDOWN_READ)) {
return 0;
}
@@ -361,7 +363,7 @@ static int qio_channel_tls_shutdown(QIOChannel *ioc,
{
QIOChannelTLS *tioc = QIO_CHANNEL_TLS(ioc);
- tioc->shutdown |= how;
+ qatomic_or(&tioc->shutdown, how);
return qio_channel_shutdown(tioc->master, how, errp);
}