Re: Spinlock recursion in usbnet + rndis-wlan

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

 



On Mon, 19 Jan 2009, David Brownell wrote:

> > > 1. Drivers need to cope with any context and any locks held.
> > > This seems to be hardly practical to me. We'd beg for bugs.
> > 
> > It's the situation we're in right now.  So far there haven't been very 
> > many bugs.
> 
> Haven't been many reports mostly by chance.  Mass storage
> could hit similar issues after scatterlist cleanup, ISTR.

No.  The usb_sg_* routines are very careful to release the spinlock 
before calling usb_submit_urb or usb_unlink_urb.  For example, 
sg_complete() contains this:

		/* the previous urbs, and this one, completed already.
		 * unlink pending urbs so they won't rx/tx bad data.
		 * careful: unlink can sometimes be synchronous...
		 */
		spin_unlock(&io->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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux