浏览代码

Bluetooth: Fix missing hci_dev_lock_bh in user_confirm_reply

The code was correctly calling _unlock at the end of the function but
there was no actual _lock call anywhere.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johan Hedberg 14 年之前
父节点
当前提交
08ba53824a
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      net/bluetooth/mgmt.c

+ 2 - 0
net/bluetooth/mgmt.c

@@ -1230,6 +1230,8 @@ static int user_confirm_reply(struct sock *sk, u16 index, unsigned char *data,
 	if (!hdev)
 	if (!hdev)
 		return cmd_status(sk, index, mgmt_op, ENODEV);
 		return cmd_status(sk, index, mgmt_op, ENODEV);
 
 
+	hci_dev_lock_bh(hdev);
+
 	if (!test_bit(HCI_UP, &hdev->flags)) {
 	if (!test_bit(HCI_UP, &hdev->flags)) {
 		err = cmd_status(sk, index, mgmt_op, ENETDOWN);
 		err = cmd_status(sk, index, mgmt_op, ENETDOWN);
 		goto failed;
 		goto failed;