usb-redir: Don't try to write to the chardev after a close event
authorHans de Goede <hdegoede@redhat.com>
Sat, 19 Nov 2011 09:22:47 +0000 (10:22 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 28 Nov 2011 22:20:51 +0000 (16:20 -0600)
commit1b944953aa3ef040f5a7a5a2860add4b4b2290b5
treecd243a07f86e22d4ea52d5a1045a8d0622a0ec14
parente5daa9fb579dab9ae230479e6ba0cc4c4aa6ced9
usb-redir: Don't try to write to the chardev after a close event

Since we handle close async in a bh, do_write and thus write can get
called after receiving a close event. This patch adds a check to
the usb-redir write callback to not call qemu_chr_fe_write on a closed
backend.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
usb-redir.c