[PATCH] Bluetooth: Fix inconsistent returns 'hdev->lock'

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

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

If Set CIG Parameters fails the hdev->lock was left locked.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
---
 net/bluetooth/hci_event.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index c40ae10e7b9a..bea39d5f6936 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -3168,7 +3168,7 @@ static void hci_cc_le_set_cig_params(struct hci_dev *hdev, struct sk_buff *skb)
 			conn->state = BT_CLOSED;
 			hci_connect_cfm(conn, rp->status);
 			hci_conn_del(conn);
-			return;
+			goto unlock;
 		}
 
 		conn->handle = __le16_to_cpu(rp->handle[i++]);
@@ -3183,6 +3183,7 @@ static void hci_cc_le_set_cig_params(struct hci_dev *hdev, struct sk_buff *skb)
 			break;
 	}
 
+unlock:
 	rcu_read_unlock();
 
 	hci_dev_unlock(hdev);
-- 
2.21.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