• Takashi Iwai's avatar
    Bluetooth: vhci: Fix race at creating hci device · c7c999cb
    Takashi Iwai authored
    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>
    c7c999cb
hci_vhci.c 8.18 KB