mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
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.
This commit is contained in:
parent
d7cf1814bd
commit
ee318606ce
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=351324
|
@ -554,6 +554,7 @@ ubt_do_hci_request(struct usb_device *udev, struct ubt_hci_cmd *cmd,
|
|||
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,
|
||||
|
|
Loading…
Reference in a new issue