Some 9pfs bugs fixes: potential hang at reset, migration blocker leak.
-----BEGIN PGP SIGNATURE----- iEYEABECAAYFAljjxNsACgkQAvw66wEB28Ie0ACdG7BpEyoy88s3EbJl+oVOWKPJ wkYAninjG993/z1UNjiPh0oKOKOMY8G3 =mLFF -----END PGP SIGNATURE----- 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>
This commit is contained in:
commit
1413c663c9
19
hw/9pfs/9p.c
19
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;
|
||||
s->fid_list = fidp->next;
|
||||
fidp->ref++;
|
||||
|
||||
if (fidp->ref) {
|
||||
fidp->clunked = 1;
|
||||
} else {
|
||||
free_fid(pdu, fidp);
|
||||
}
|
||||
/* Clunk fid */
|
||||
s->fid_list = fidp->next;
|
||||
fidp->clunked = 1;
|
||||
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user