qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] uhci: Don't crash on device disconnect
@ 2012-10-31 11:54 Hans de Goede
  2012-10-31 11:54 ` [Qemu-devel] [PATCH 1/2] uhci: Add a uhci_handle_td_error() helper function Hans de Goede
  2012-10-31 11:54 ` [Qemu-devel] [PATCH 2/2] uhci: Don't crash on device disconnect Hans de Goede
  0 siblings, 2 replies; 3+ messages in thread
From: Hans de Goede @ 2012-10-31 11:54 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel

My recent uhci cleanup series has introduced a regression, where
qemu sometimes crashes on a device disconnect. The problem is that
the uhci code never checked for a device not / no longer existing, instead
it was relying on usb_handle_packet accepting a NULL device.

But since we now pass usb_handle_packet q->ep->dev, rather then just
a local dev variable, we crash as q->ep == NULL due to the device no longer
existing.

This patch-set fixes this. Note that this patch-set also improves over
the old behavior were we would:
1) create a queue for the device/ep
2) create an async for the packet
3) have usb_handle_packet fail
4) destroy the async
5) wait for the queue to be idle for 32 frames
6) destroy the queue

Which was rather sub-optimal.

Regards,

Hans

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

end of thread, other threads:[~2012-10-31 11:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-31 11:54 [Qemu-devel] [PATCH 0/2] uhci: Don't crash on device disconnect Hans de Goede
2012-10-31 11:54 ` [Qemu-devel] [PATCH 1/2] uhci: Add a uhci_handle_td_error() helper function Hans de Goede
2012-10-31 11:54 ` [Qemu-devel] [PATCH 2/2] uhci: Don't crash on device disconnect Hans de Goede

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