Re: [PATCH] kvm-tool: Don't try to cleanup ioeventfd if we never initialised it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 6 Feb 2012, Michael Ellerman wrote:
Since 44287dd (Repair running on non ioeventfd-capable platforms)
it's possible that ioeventfd__init() fails, but the VM still runs.

This means we end up calling ioeventfd__exit(), which writes()
and then reads() epoll_stop_fd. Because we failed the init,
epoll_stop_fd is 0, so we end up writing/reading stdin, which
exhibits as kvm-tool blocking until something is entered on the
console.

Once we break out of the read we close epoll_fd and epoll_stop_fd,
both 0, and so term_exit() fails to cleanup the terminal properly.

The fix is simply to check ioeventfd_avail in ioevetfd__exit() and
do nothing if it is false.

Signed-off-by: Michael Ellerman <michael@xxxxxxxxxxxxxx>

Applied, thanks!
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux