NetBSD-Bugs archive

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

re: kern/46648: disconnecting usb mouse crashes system



The following reply was made to PR kern/46648; it has been noted by GNATS.

From: christos%zoulas.com@localhost (Christos Zoulas)
To: matthew green <mrg%eterna.com.au@localhost>, gnats-bugs%NetBSD.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, 
        netbsd-bugs%netbsd.org@localhost
Subject: re: kern/46648: disconnecting usb mouse crashes system
Date: Sun, 1 Jul 2012 19:11:28 -0400

 On Jul 2,  9:02am, mrg%eterna.com.au@localhost (matthew green) wrote:
 -- Subject: re: kern/46648: disconnecting usb mouse crashes system
 
 | 
 | hmmmm, this problem looks pretty annoying, and might affect many
 | devices.  the problem seems to be that:
 | 
 |      - device was pulled out with active transfers
 | 
 |      - the handling of an error in the transfer callback function
 |      is to call usbd_clear_endpoint_stall_async(), which then
 |      sends a clear endpoint transfer
 | 
 |      - adapter transfer list is empty, causing kmem_alloc call,
 |      triggering the assertion since this is happening from the
 |      softintr thread
 | 
 | this idiom is used in many of the USB drivers, so a solution that
 | does not require each one changing seems appropriate.
 | 
 | i'm not sure yet exactly the right answer.  it's clear to me (and
 | has been or a while, since before usbmp) that the USB softintr
 | does way too much work.
 
 Have a pre-allocated xfer to be used on disconnect. Does this need
 to be per driver or per bus?
 
 christos
 


Home | Main Index | Thread Index | Old Index