提交 9380f9ea 编写于 作者: L Loic Poulain 提交者: Marcel Holtmann

Bluetooth: Reorder HCI user channel socket release

The hci close method needs to know if we are in user channel context.
Only add the index to mgmt once close is performed.
Signed-off-by: NLoic Poulain <loic.poulain@intel.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 951b6a07
...@@ -503,9 +503,9 @@ static int hci_sock_release(struct socket *sock) ...@@ -503,9 +503,9 @@ static int hci_sock_release(struct socket *sock)
if (hdev) { if (hdev) {
if (hci_pi(sk)->channel == HCI_CHANNEL_USER) { if (hci_pi(sk)->channel == HCI_CHANNEL_USER) {
mgmt_index_added(hdev);
hci_dev_clear_flag(hdev, HCI_USER_CHANNEL);
hci_dev_close(hdev->id); hci_dev_close(hdev->id);
hci_dev_clear_flag(hdev, HCI_USER_CHANNEL);
mgmt_index_added(hdev);
} }
atomic_dec(&hdev->promisc); atomic_dec(&hdev->promisc);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册