Bluetooth: hci_qca: Bug fix during SSR timeout
authorVenkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>
Tue, 9 Jun 2020 15:57:08 +0000 (21:27 +0530)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 10 Jun 2020 04:42:07 +0000 (06:42 +0200)
commitf98aa80ff78c34fe328eb9cd3e2cc3058e42bcfd
treee57d21cae70a8ec3915a0788bff87082a2673eda
parenta9ec8423134a54c9f0ae8d4ef59e1e833ca917c2
Bluetooth: hci_qca: Bug fix during SSR timeout

Due to race conditions between qca_hw_error and qca_controller_memdump
during SSR timeout,the same pointer is freed twice. This results in a
double free. Now a lock is acquired before checking the stauts of SSR
state.

Fixes: d841502c79e3 ("Bluetooth: hci_qca: Collect controller memory dump during SSR")
Signed-off-by: Venkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_qca.c