[Bug 291506] libusb_open advisory lock (libusb compatiblity)

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 12 Dec 2025 13:05:45 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291506

--- Comment #4 from unitrunker <unitrunker@unitrunker.net> ---
The usbgrab tool can be used to illustrate the problem.

Invoking 'usbgrab <vid> <pid>' will return after opening one device.

Assuming only one such device is attached, adding the "-a" to grab all such
devices returns with 32 devices. There is a hard limit on a maximum of 32
devices before usbgrab stops. There is in fact only one such device but
libusb_open_with_vid_pid returns the same device 32 times.

libusb client software depends upon:
a. libusb_open returning an error for a device already in use. 
b. libusb_open_with_vid_pid NOT returning a device already in use.

-- 
You are receiving this mail because:
You are the assignee for the bug.