From: Ed Swierk <eswierk@aristanetworks.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] getfd monitor command broken
Date: Fri, 19 Feb 2010 10:21:41 -0800 [thread overview]
Message-ID: <9ae48b021002191021r7e7afb4bxd1d47624e07db1e9@mail.gmail.com> (raw)
Commit c62313bbdc48f72e93fa8196f2fff96ba35e4e9d seems to have broken
the getfd monitor command in qemu 0.12.
tcp_chr_read() calls tcp_chr_recv(), which checks whether the received
message includes an SCM_RIGHTS header, and if so, stores the received
fd in the CharDriverState struct. tcp_chr_read() passes the received
data to the monitor via qemu_chr_read(), and then closes the stored
fd.
Previously, tcp_chr_read() would receive the entire getfd command in
one message (perhaps by sheer luck), allowing the monitor to call
qemu_chr_get_msgfd() to obtain the stored fd before it disappeared.
Now that tcp_chr_read() receives only 1 byte at a time, the stored fd
vanishes when it receives byte 2.
I'm too confused by this control flow to suggest a proper solution,
but commenting out the "if (s->msgfd != -1)" block in tcp_chr_read()
at least makes the problem go away.
--Ed
next reply other threads:[~2010-02-19 18:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-19 18:21 Ed Swierk [this message]
2010-02-22 20:51 ` [Qemu-devel] getfd monitor command broken Luiz Capitulino
2010-02-22 21:55 ` Ed Swierk
2010-02-23 5:30 ` Ed Swierk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9ae48b021002191021r7e7afb4bxd1d47624e07db1e9@mail.gmail.com \
--to=eswierk@aristanetworks.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).