qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] getfd monitor command broken
@ 2010-02-19 18:21 Ed Swierk
  2010-02-22 20:51 ` Luiz Capitulino
  0 siblings, 1 reply; 4+ messages in thread
From: Ed Swierk @ 2010-02-19 18:21 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-02-23  5:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-19 18:21 [Qemu-devel] getfd monitor command broken Ed Swierk
2010-02-22 20:51 ` Luiz Capitulino
2010-02-22 21:55   ` Ed Swierk
2010-02-23  5:30   ` Ed Swierk

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).