Bluetooth: Fix inconsistent returns 'hdev->lock'
Subsystems (2)
Luiz Augusto von Dentz
maintainerPATCH 1/1 Bluetooth: Fix inconsistent returns 'hdev->lock'
From: Luiz Augusto von Dentz <[email protected]>
If Set CIG Parameters fails the hdev->lock was left locked.
Signed-off-by Luiz Augusto von Dentz <[email protected]>
--- net/bluetooth/hci_event.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/bluetooth/hci_event.c +2 -1
@@ -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);
Signature · 1 line
2.21.0
Luiz Augusto von Dentz
maintainerHi,
Quoted 32 lines · Luiz Augusto von Dentz
From: Luiz Augusto von Dentz <[email protected]>
If Set CIG Parameters fails the
hdev->lockwas left locked.Signed-off-by Luiz Augusto von Dentz <[email protected]>--- net/bluetooth/hci_event.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)net/bluetooth/hci_event.c +2
-2@@ -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); --
Quoted 1 line
2.21.0
Please ignore this, the original patch is not in bluetooth-next yet.
Signature · 1 line
Luiz Augusto von Dentz