Page MenuHomeFreeBSD

libusb: fix hotplug sigbus
ClosedPublic

Authored by bapt on Jan 3 2025, 10:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 22, 7:46 AM
Unknown Object (File)
Fri, May 22, 4:42 AM
Unknown Object (File)
Thu, May 21, 5:17 PM
Unknown Object (File)
Wed, May 20, 11:47 AM
Unknown Object (File)
Mon, May 18, 3:08 AM
Unknown Object (File)
Sun, May 17, 9:31 PM
Unknown Object (File)
Mon, May 11, 5:03 AM
Unknown Object (File)
Tue, Apr 28, 1:18 PM
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