[PATCH v2 0/2] Bluetooth: iso: Fix circular lock warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch fixes the circular locking dependency warnings in iso.c,
caused by A->B/B->A type lock ordering with sk and hdev.

The first commit fixes the warning caused by iso_listen_bis, by
releasing sk lock before entering the function and acquiring hdev
lock.

The second commit fixes the warning caused by iso_conn_big_sync.
This reworks iso_sock_recvmsg, since it contains multiple function
calls that need sk lock to be released: The socket needs to be kept
alive with sock_hold before being released. To avoid multiple
hold/release/lock/put calls, the socket is grabbed and locked at the
beginning of the switch, and it is released and ungrabbed at the end,
with release/lock calls when necessary in the switch.

Iulia Tanasescu (2):
  Bluetooth: iso: Fix circular lock in iso_listen_bis
  Bluetooth: iso: Fix circular lock in iso_conn_big_sync

 net/bluetooth/iso.c | 48 ++++++++++++++++++++++++++++++++++++---------
 1 file changed, 39 insertions(+), 9 deletions(-)


base-commit: 269f7b219173ffbb01121243c55cef8a5503593b
-- 
2.43.0





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux