Re: possible race in usb_autopm_get_interface_async()

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

 



On Fri, 5 Jun 2009, Oliver Neukum wrote:

> > By the way, what is your application?  And doesn't it turn out that you
> > naturally want to hold a private lock during these calls anyway?
> 
> I am looking at usbnet. And it turns out that I don't want locking.
> That's what it looks like now. I suspect you want locking in character
> devices and drivers that reuse URB(s).
> If you have flow control in an upper layer and free completed URBs
> I suspect locking is an unnecessary complication.
> You are looking at the serial layer too often. It makes you think locking
> is natural here ;-)

Actually these thoughts were formulated long before I started looking 
in detail at the serial layer...

Also, I noticed that you didn't post the get_interface_async parts.  
Are they protected by a lock?  Yes, it had occurred to me that a 
natural use case would involve locking in only one of the two sides.

Anyway, I'll work on a patch to convert the value to atomic_t.

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