]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: hci_ldisc: Fix null pointer derefence in case of early data
authorLoic Poulain <loic.poulain@intel.com>
Mon, 4 Apr 2016 08:48:13 +0000 (10:48 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 8 Apr 2016 16:58:56 +0000 (18:58 +0200)
commit2b61ba5f91234bccde385fc66042f28143cd0c68
tree4802172d6283adade1e8299ed851b4b2af8c14d2
parent5a8cac3de5847098607ce87c5b51ae0184ac46e8
Bluetooth: hci_ldisc: Fix null pointer derefence in case of early data

HCI_UART_PROTO_SET flag is set before hci_uart_set_proto call. If we
receive data from tty layer during this procedure, proto pointer may
not be assigned yet, leading to null pointer dereference in rx method
hci_uart_tty_receive.

This patch fixes this issue by introducing HCI_UART_PROTO_READY flag in
order to avoid any proto operation before proto opening and assignment.

Signed-off-by: Loic Poulain <loic.poulain@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_ldisc.c
drivers/bluetooth/hci_uart.h