On Mon, 11 Jan 2010, Oliver Neukum wrote: > Am Montag, 11. Januar 2010 18:12:24 schrieb Alan Stern: > > On Mon, 11 Jan 2010, Oliver Neukum wrote: > > > > > Am Freitag, 8. Januar 2010 18:56:19 schrieb Alan Stern: > > > > This patch (as1323) changes the locking requirements for > > > > usb_autosuspend_device(), usb_autoresume_device(), and > > > > usb_try_autosuspend_device(). This isn't a very important change; > > > > mainly it's meant to make the locking more uniform. > > > > > > This however affects memory allocation and access to user space. > > > You cannot access user space and memory must be allocated with > > > GFP_NOIO. > > > This should be documented and we need to audit the core. > > > > I don't understand. Can you explain more fully? > > Suppose we do copy_from_user(). This causes an iSCSI request. > This would go out over a cdc ether interface, which is autosuspended. > The driver needs to take the lock. We deadlock. I still don't understand. First, why would usb_autosuspend_device(), usb_autoresume_device(), or usb_try_autosuspend_device() do copy_from_user()? As a general rule, they don't have a meaningful user context. Second, why would the driver need to take the device lock? Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html