diff options
author | Peter Maydell | 2017-04-04 19:00:23 +0200 |
---|---|---|
committer | Peter Maydell | 2017-04-04 19:00:23 +0200 |
commit | 1413c663c9e02a8669e67ed6e9a21941a8df5f92 (patch) | |
tree | 3b1bfe9d41405b89860e7a580c682d2cb66efa92 /hw | |
parent | Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (diff) | |
parent | 9pfs: clear migration blocker at session reset (diff) | |
download | qemu-1413c663c9e02a8669e67ed6e9a21941a8df5f92.tar.gz qemu-1413c663c9e02a8669e67ed6e9a21941a8df5f92.tar.xz qemu-1413c663c9e02a8669e67ed6e9a21941a8df5f92.zip |
Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging
Some 9pfs bugs fixes: potential hang at reset, migration blocker leak.
# gpg: Signature made Tue 04 Apr 2017 17:07:55 BST
# gpg: using DSA key 0x02FC3AEB0101DBC2
# gpg: Good signature from "Greg Kurz <groug@kaod.org>"
# gpg: aka "Greg Kurz <groug@free.fr>"
# gpg: aka "Greg Kurz <gkurz@linux.vnet.ibm.com>"
# gpg: aka "Gregory Kurz (Groug) <groug@free.fr>"
# gpg: aka "[jpeg image of size 3330]"
# 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: 2BD4 3B44 535E C0A7 9894 DBA2 02FC 3AEB 0101 DBC2
* remotes/gkurz/tags/for-upstream:
9pfs: clear migration blocker at session reset
9pfs: fix multiple flush for same request
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/9pfs/9p.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 48babce836..c80ba67389 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -539,14 +539,15 @@ static void coroutine_fn virtfs_reset(V9fsPDU *pdu) /* Free all fids */ while (s->fid_list) { + /* Get fid */ fidp = s->fid_list; + fidp->ref++; + + /* Clunk fid */ s->fid_list = fidp->next; + fidp->clunked = 1; - if (fidp->ref) { - fidp->clunked = 1; - } else { - free_fid(pdu, fidp); - } + put_fid(pdu, fidp); } } @@ -2387,8 +2388,10 @@ static void coroutine_fn v9fs_flush(void *opaque) * Wait for pdu to complete. */ qemu_co_queue_wait(&cancel_pdu->complete, NULL); - cancel_pdu->cancelled = 0; - pdu_free(cancel_pdu); + if (!qemu_co_queue_next(&cancel_pdu->complete)) { + cancel_pdu->cancelled = 0; + pdu_free(cancel_pdu); + } } pdu_complete(pdu, 7); } |