Page MenuHomeFreeBSD

libusb: fix hotplug sigbus
ClosedPublic

Authored by bapt on Fri, Jan 3, 10:06 AM.
Tags
None
Referenced Files
F107062894: D48298.diff
Thu, Jan 9, 12:48 PM
Unknown Object (File)
Tue, Jan 7, 6:01 PM
Unknown Object (File)
Tue, Jan 7, 1:38 AM
Unknown Object (File)
Mon, Jan 6, 2:21 PM
Unknown Object (File)
Mon, Jan 6, 9:53 AM
Unknown Object (File)
Mon, Jan 6, 1:09 AM
Unknown Object (File)
Sun, Jan 5, 8:21 PM
Unknown Object (File)
Sat, Jan 4, 10:22 AM
Subscribers

Details

Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable