Commit 4c5fea2e authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Zhihong Yu
Browse files

FROMLIST: Bluetooth: hci_qca: Fix crash with non-serdev devices

qca_set_baudrate() calls serdev_device_wait_until_sent() assuming that
the HCI is always associated with a serdev device. This isn't true for
ROME controllers instantiated through ldisc, where the call causes a
crash due to a NULL pointer dereferentiation. Only call the function
when we have a serdev device. The timeout for ROME devices at the end
of qca_set_baudrate() is long enough to be reasonably sure that the
command was sent.

(am from https://lore.kernel.org/patchwork/patch/1050594/

)

Fixes: fa9ad876 ("Bluetooth: hci_qca: Add support for Qualcomm
Bluetooth chip wcn3990")
Reported-by: default avatarBalakrishna Godavarthi <bgodavar@codeaurora.org>
Reported-by: default avatarRocky Liao <rjliao@codeaurora.org>
Signed-off-by: default avatarMatthias Kaehlcke <mka@chromium.org>
Reviewed-by: default avatarRocky Liao <rjliao@codeaurora.org>
Tested-by: default avatarRocky Liao <rjliao@codeaurora.org>

BUG=b:132147953
TEST=None

Change-Id: I70d086962049a7f1f64a36138d2a82975fde02aa
Signed-off-by: default avatarHarish Bandi <c-hbandi@codeaurora.org>
Signed-off-by: default avatarVamsi Singamsetty <vamssi@codeaurora.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1603082


Reviewed-by: default avatarZhihong Yu <zhihongyu@chromium.org>
Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
Commit-Queue: Zhihong Yu <zhihongyu@chromium.org>
Tested-by: default avatarZhihong Yu <zhihongyu@chromium.org>
parent f83e4f78
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment