Hi,

Due to various unfortunate reasons we cannot reliable detect a guest
cancelling a packet as soon as it happens, instead we detect cancels
with some delay.

When packets are handled async, and we directly pass the guest memory for
the packet to the usb-device as iovec, this means that the usb-device can
write to guest-memory which the guest has already re-used for other purposes
-> not good!

This patch fixes this by adding an intermediate buffer and writing back not
only the result, but also the data, of async completed packets when scanning
the schedule.

Changes in v2: Use usb_packet_addbuf instead of directly calling iovec_add

Signed-off-by: Hans de Goede <hdego...@redhat.com>

Regards,

Hans

Reply via email to