diff options
| author | Johan Hedberg <[email protected]> | 2015-10-16 07:07:50 +0000 |
|---|---|---|
| committer | Marcel Holtmann <[email protected]> | 2015-10-16 07:24:41 +0000 |
| commit | b958f9a3e87766a88036616389eaaf3ad3bd5fc8 (patch) | |
| tree | 777aeff10b00deff3a174992ccf4c59b2ca31e6d /net/switchdev/switchdev.c | |
| parent | Bluetooth: Fix double scan updates (diff) | |
| download | kernel-b958f9a3e87766a88036616389eaaf3ad3bd5fc8.tar.gz kernel-b958f9a3e87766a88036616389eaaf3ad3bd5fc8.zip | |
Bluetooth: Fix reference counting for LE-scan based connections
The code should never directly call hci_conn_hash_del since many
cleanup & reference counting updates would be lost. Normally
hci_conn_del is the right thing to do, but in the case of a connection
doing LE scanning this could cause a deadlock due to doing a
cancel_delayed_work_sync() on the same work callback that we were
called from.
Connections in the LE scanning state actually need very little cleanup
- just a small subset of hci_conn_del. To solve the issue, refactor
out these essential pieces into a new hci_conn_cleanup() function and
call that from the two necessary places.
Signed-off-by: Johan Hedberg <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions
