X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=net%2Fbluetooth%2Fmgmt.c;h=3e574540b2c2fab568c07e768f03bca4a40fbb17;hb=e503fc621facb9f21bee519e94adbf0061d445f8;hp=3817728878da4e8106424071bd654802a96244d0;hpb=c30d344580ad053502cf5d81288dcd690791d162;p=firefly-linux-kernel-4.4.55.git diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 3817728878da..3e574540b2c2 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -2333,8 +2333,13 @@ static int user_pairing_resp(struct sock *sk, struct hci_dev *hdev, } if (addr->type == BDADDR_LE_PUBLIC || addr->type == BDADDR_LE_RANDOM) { - /* Continue with pairing via SMP */ + /* Continue with pairing via SMP. The hdev lock must be + * released as SMP may try to recquire it for crypto + * purposes. + */ + hci_dev_unlock(hdev); err = smp_user_confirm_reply(conn, mgmt_op, passkey); + hci_dev_lock(hdev); if (!err) err = cmd_complete(sk, hdev->id, mgmt_op,