Message ID | 20200716093119.10740-3-kraxel@redhat.com |
---|---|
State | Superseded |
Headers | show |
Series | [PULL,1/2] vfio: fix use-after-free in display | expand |
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index 2ed6a8df2413..405a4ccfe700 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -546,8 +546,7 @@ static void usb_msd_handle_data(USBDevice *dev, USBPacket *p) } } } - if (p->actual_length < p->iov.size && (p->short_not_ok || - s->scsi_len >= p->ep->max_packet_size)) { + if (p->actual_length < p->iov.size && s->mode == USB_MSDM_DATAIN) { DPRINTF("Deferring packet %p [wait data-in]\n", p); s->packet = p; p->status = USB_RET_ASYNC;