]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
Bluetooth: hci_ldisc: Add missing clear HCI_UART_PROTO_READY
authorDean Jenkins <Dean_Jenkins@mentor.com>
Thu, 20 Apr 2017 17:06:41 +0000 (18:06 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 22 Apr 2017 08:28:40 +0000 (10:28 +0200)
commitd160b74da85a4ec072b076db056e27ba7246eba0
treed7c0d6f55b9843a786bdaf98f25ff04d1510339b
parenta225b8c70af9368cfcb52a3608bc862bc88a7801
Bluetooth: hci_ldisc: Add missing clear HCI_UART_PROTO_READY

Ensure that HCI_UART_PROTO_READY is cleared before close(hu) is
called which closes the Data Link protocol layer.

Therefore, add the missing bit clear of HCI_UART_PROTO_READY to
hci_uart_init_work() so that the flag is cleared when
hci_register_dev fails.

Without the fix, the functions of the Data Link protocol layer could
potentially be accessed after that layer has been closed. This
could lead to a crash as memory would have been freed in that layer.

Signed-off-by: Dean Jenkins <Dean_Jenkins@mentor.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_ldisc.c