HomeFreeBSD

libusb: fix hotplug sigbus

Description

libusb: fix hotplug sigbus

When a hotplug callback has been registered, and the program using
libusb is calling libusb_exit then the thread handler is set to
NO_THREAD which result in the variable controlling the loop the be set
to 0, it does a last pass through device available without having done
a scan, which result in a sigbus after it tried to unregister all the
devices.

directly break the loop instead and cleanup the list of devices

this fixes the tests with LGPLed libusb's hotplugtest program

MFC After: 3 days
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D48298

(cherry picked from commit ba5834b8e11fd002a663d083a464e397e76cb3a9)

Details

Provenance
baptAuthored on Fri, Jan 3, 9:50 AM
Reviewer
kevans
Differential Revision
D48298: libusb: fix hotplug sigbus
Parents
rG589cf0f3e26f: Revert "Export additional __aeabi_ symbols from arm's libgcc_s"
Branches
Unknown
Tags
Unknown