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:Balakrishna Godavarthi <bgodavar@codeaurora.org> Reported-by:
Rocky Liao <rjliao@codeaurora.org> Signed-off-by:
Matthias Kaehlcke <mka@chromium.org> Reviewed-by:
Rocky Liao <rjliao@codeaurora.org> Tested-by:
Rocky Liao <rjliao@codeaurora.org> BUG=b:132147953 TEST=None Change-Id: I70d086962049a7f1f64a36138d2a82975fde02aa Signed-off-by:
Harish Bandi <c-hbandi@codeaurora.org> Signed-off-by:
Vamsi Singamsetty <vamssi@codeaurora.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1603082 Reviewed-by:
Zhihong Yu <zhihongyu@chromium.org> Reviewed-by:
Sean Paul <seanpaul@chromium.org> Commit-Queue: Zhihong Yu <zhihongyu@chromium.org> Tested-by:
Zhihong Yu <zhihongyu@chromium.org>
Loading
Please sign in to comment