usb_authorize_device and usb_deauthorize_device

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

 



Inaky and David:

Looking through usb_authorize_device() and usb_deauthorize_device(), 
those two routines appear to have several problems:

	usb_authorize_device() calls usb_autoresume_device() but
	not usb_autosuspend_device().  It this a simple oversight?

	usb_deauthorize_device() frees a lot of refcounted data
	structures without regard to the refcounts.  Why doesn't
	it leave them to be deallocated in the normal way?

	usb_deauthorize_device() leaks several strings.  Oddly
	enough, usb_authorize_device() handles them correctly.  But
	it races with the strings' show routines in sysfs.c,
	because those routines don't acquire the device lock.

Does either of you want to fix these issues?

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