summary refs log tree commit diff stats
path: root/hw/9pfs/coth.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-09-03 08:27:38 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-09-03 08:27:38 +0100
commit8880cc4362fde4ecdac0b2092318893118206fcf (patch)
treea81a9551af9a95a4d679cdfda561c089a4542b79 /hw/9pfs/coth.h
parent8664d30a30fd676b56b4c29dbcbdd5c5538acfc1 (diff)
parentf83df00900816476cca41bb536e4d532b297d76e (diff)
downloadfocaccia-qemu-8880cc4362fde4ecdac0b2092318893118206fcf.tar.gz
focaccia-qemu-8880cc4362fde4ecdac0b2092318893118206fcf.zip
Merge remote-tracking branch 'remotes/cschoenebeck/tags/pull-9p-20210902' into staging
9pfs: misc patches

* Fix an occasional crash when handling 'Twalk' requests.

* Two code cleanup patches.

# gpg: Signature made Thu 02 Sep 2021 12:42:32 BST
# gpg:                using RSA key 96D8D110CF7AF8084F88590134C2B58765A47395
# gpg:                issuer "qemu_oss@crudebyte.com"
# gpg: Good signature from "Christian Schoenebeck <qemu_oss@crudebyte.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: ECAB 1A45 4014 1413 BA38  4926 30DB 47C3 A012 D5F4
#      Subkey fingerprint: 96D8 D110 CF7A F808 4F88  5901 34C2 B587 65A4 7395

* remotes/cschoenebeck/tags/pull-9p-20210902:
  9pfs: fix crash in v9fs_walk()
  hw/9pfs: use g_autofree in v9fs_walk() where possible
  hw/9pfs: avoid 'path' copy in v9fs_walk()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/9pfs/coth.h')
-rw-r--r--hw/9pfs/coth.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/9pfs/coth.h b/hw/9pfs/coth.h
index c51289903d..f83c7dda7b 100644
--- a/hw/9pfs/coth.h
+++ b/hw/9pfs/coth.h
@@ -51,7 +51,9 @@
          */                                                             \
         qemu_coroutine_yield();                                         \
         qemu_bh_delete(co_bh);                                          \
-        code_block;                                                     \
+        do {                                                            \
+            code_block;                                                 \
+        } while (0);                                                    \
         /* re-enter back to qemu thread */                              \
         qemu_coroutine_yield();                                         \
     } while (0)