Re: [PATCH] Bluetooth: Fix decrementing reference count twice in releasing socket

2019-02-04 Thread Marcel Holtmann
Hi Myungho, > When releasing socket, it is possible to enter hci_sock_release() and > hci_sock_dev_event(HCI_DEV_UNREG) at the same time in different thread. > The reference count of hdev should be decremented only once from one of > them but if storing hdev to local variable in hci_sock_release()

[PATCH] Bluetooth: Fix decrementing reference count twice in releasing socket

2019-02-02 Thread Myungho Jung
When releasing socket, it is possible to enter hci_sock_release() and hci_sock_dev_event(HCI_DEV_UNREG) at the same time in different thread. The reference count of hdev should be decremented only once from one of them but if storing hdev to local variable in hci_sock_release() before detached from