Bluetooth: More lockdep warning fixes with the help of RCU
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | Bluetooth: Convert LTK list to RCUinclude/ net/ net/ +1 more | +31 | 0 replies | |
| 2/4 | Bluetooth: Convert IRK list to RCUinclude/ net/ net/ | +33 | 0 replies | |
| 3/4 | Bluetooth: Remove unnecessary hdev locking in smp.cnet/ | +0 | 0 replies | |
| 4/4 | Bluetooth: Add debug logs to help track locking issuesnet/ net/ | +11 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] Bluetooth: More lockdep warning fixes with the help of RCU
Hi,
This patch set converts the LTK and IRK lists to use RCU which eliminates the need to always hold the hdev lock while accessing these lists. This helps us fix more lockdep warnings arising from hdev locking in smp.c.
What this patch set doesn't fix is the general problem of the SMP context holding references to list entries without any guarantee that those references stay valid if some other thread goes and removes the entries. For this the proper fix would probably be to introduce kref for the entries to ensure that external references stay valid. However, since that requires considerably more code it's better to first merge most lists into a single "remote device info" list that's protected both by kref and RCU.
Johan
----------------------------------------------------------------
Johan Hedberg (4):
Bluetooth: Convert LTK list to RCU
Bluetooth: Convert IRK list to RCU
Bluetooth: Remove unnecessary hdev locking in smp.c
Bluetooth: Add debug logs to help track locking issues
include/net/bluetooth/hci_core.h | 2 + net/bluetooth/hci_core.c | 88 ++++++++++++++++++++++---------------- net/bluetooth/hci_event.c | 4 +- net/bluetooth/l2cap_core.c | 3 +- net/bluetooth/l2cap_sock.c | 10 ++++- net/bluetooth/smp.c | 27 ++++-------- 6 files changed, 75 insertions(+), 59 deletions(-)