[argyllcms] Re: HID issue with libusb on Huey

  • From: Graeme Gill <graeme@xxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Sat, 15 Dec 2007 13:37:52 +1100

Frédéric Crozat wrote:
Hi guys,

sorry to break threading but I wasn't subscribed to the mailing list.

libusb not being able to unbind HID driver for Huey is not a security
problem : I have the problem even as root.

After a quick review of usbio.c code, it appear unbinding is tried
only AFTER usb_set_configuration success. Unfortunately,
when device is handled by usbhid, ioctl IOCTL_USB_DISCONNECT fails,
preventing unbind.

I've also taken the opportunity to check your changes on libusb,
compared to "upstream". Only one change seems relevant for linux. Do
you have
more informations on it ?

Sorry, this is a known bug in argyll/usbio.c that I haven't
got around to posting about.

Hal V. Engel brought it to my attention a little while ago.

I don't see it on my system, but it seems to crop up on others.
The usb_detach_kernel_driver_np() call needs to be taken out
of the the "claim interface" loop, and moved before the
call to usb_set_configuration(), and it should also
only usb_detach_kernel_driver_np() interface 0.

I suspect that on some systems you still need to be root
for the usb_detach_kernel_driver_np() to succeed though.
I don't see this on my system.

Graeme Gill.

Other related posts: