svn commit: r351324 - head/sys/netgraph/bluetooth/drivers/ubt
Xin LI
delphij at FreeBSD.org
Wed Aug 21 07:45:40 UTC 2019
Author: delphij
Date: Wed Aug 21 07:45:39 2019
New Revision: 351324
URL: https://svnweb.freebsd.org/changeset/base/351324
Log:
Fix a panic in ubt_do_hci_request.
The 'mtx' is on stack and can contain garbages that would cause mtx_init
(and in turn lock_init) to think that the mutex was already initialized.
Modified:
head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
==============================================================================
--- head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Wed Aug 21 04:54:48 2019 (r351323)
+++ head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Wed Aug 21 07:45:39 2019 (r351324)
@@ -554,6 +554,7 @@ ubt_do_hci_request(struct usb_device *udev, struct ubt
return (USB_ERR_NORMAL_COMPLETION);
/* Initialize INTR endpoint xfer and wait for response */
+ bzero(&mtx, sizeof(mtx));
mtx_init(&mtx, "ubt pb", NULL, MTX_DEF);
error = usbd_transfer_setup(udev, &iface_index, xfer,
More information about the svn-src-all
mailing list