Re: possible race in usb_autopm_get_interface_async()

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

 



Am Mittwoch, 3. Juni 2009 18:37:38 schrieb Alan Stern:
> On Wed, 3 Jun 2009, Oliver Neukum wrote:
> > Hi Alan,
> >
> > I am looking at using the interface in practice. It seems to me that
> > pm_usage_cnt can become corrupted if usb_autopm_get_interface_async()
> > and usb_autopm_put_interface_async() race. Convert it to atomic_t?
>
> Or else have the driver do some sort of locking.  You'd probably want
> locking anyway.

The problem with that is that it is a difference in behavior to the sync
versions. It violates the principle of least surprise.

	Regards
		Oliver

--
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