Re: [patch 02/03] USB: USB/IP: add client driver

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <greg@...>
Cc: <linux-usb@...>, <linux-kernel@...>, Brian Merrell <bgmerrell@...>, Takahiro Hirofuchi <hirofuchi@...>, <gregkh@...>
Date: Friday, August 29, 2008 - 4:23 am

Am Freitag 29 August 2008 01:00:35 schrieb greg@kroah.com:


I realise it is commented out, but still.

The resume method may sleep. It is documented as such. Thus it can
reenable interrupts. Therefore you can deadlock if you don't use irqrestore.



There's no reason to hold the lock longer than necessary by
allocating memory in the lock section.

[..]

again


This is called in the context of usb_submit_urb()

[..]

This can fail for any urb due to urb->reject


The branch would be taken

[..]

This calls urb->complete. If the completion handler takes a spinlock
which is held when usb_submit_urb() was called, you deadlock.


[..]

This must be called with interrupts disabled.


	Regards
		Oliver
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/03] USB-IP patches, , (Thu Aug 28, 7:00 pm)
Re: [patch 00/03] USB-IP patches, Brian G. Merrell, (Sat Aug 30, 1:50 am)
Re: [patch 00/03] USB-IP patches, Greg KH, (Tue Sep 2, 1:12 pm)
Re: [patch 00/03] USB-IP patches, Brian G. Merrell, (Tue Sep 23, 9:28 pm)
Re: [patch 00/03] USB-IP patches, Arnaldo Carvalho de Melo, (Thu Aug 28, 7:06 pm)
Re: [patch 03/03] USB: USB/IP: add host driver, Willy Tarreau, (Fri Aug 29, 1:43 am)
Re: [patch 02/03] USB: USB/IP: add client driver, Alan Stern, (Fri Aug 29, 12:02 pm)
Re: [patch 02/03] USB: USB/IP: add client driver, Oliver Neukum, (Fri Aug 29, 4:23 am)