Skip to content
Commit c7c999cb authored by Takashi Iwai's avatar Takashi Iwai Committed by Marcel Holtmann
Browse files

Bluetooth: vhci: Fix race at creating hci device



hci_vhci driver creates a hci device object dynamically upon each
HCI_VENDOR_PKT write.  Although it checks the already created object
and returns an error, it's still racy and may build multiple hci_dev
objects concurrently when parallel writes are performed, as the device
tracks only a single hci_dev object.

This patch introduces a mutex to protect against the concurrent device
creations.

Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 60f5f5d3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment