diff options
author | Ingo Molnar | 2015-09-30 09:29:27 +0200 |
---|---|---|
committer | Ingo Molnar | 2015-09-30 09:29:27 +0200 |
commit | ccf79c238f1a06a801b4c4449b9bc8a42be2c7bc (patch) | |
tree | e9b0f1a4c2f324c6fb107e276b09894ae480baa6 /net/bluetooth/smp.c | |
parent | x86/hyperv: Fix the build in the !CONFIG_KEXEC_CORE case (diff) | |
parent | Linux 4.3-rc3 (diff) | |
download | kernel-qcow2-linux-ccf79c238f1a06a801b4c4449b9bc8a42be2c7bc.tar.gz kernel-qcow2-linux-ccf79c238f1a06a801b4c4449b9bc8a42be2c7bc.tar.xz kernel-qcow2-linux-ccf79c238f1a06a801b4c4449b9bc8a42be2c7bc.zip |
Merge tag 'v4.3-rc3' into x86/urgent, before applying dependent fix
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/bluetooth/smp.c')
-rw-r--r-- | net/bluetooth/smp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index ad82324f710f..0510a577a7b5 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -2311,12 +2311,6 @@ int smp_conn_security(struct hci_conn *hcon, __u8 sec_level) if (!conn) return 1; - chan = conn->smp; - if (!chan) { - BT_ERR("SMP security requested but not available"); - return 1; - } - if (!hci_dev_test_flag(hcon->hdev, HCI_LE_ENABLED)) return 1; @@ -2330,6 +2324,12 @@ int smp_conn_security(struct hci_conn *hcon, __u8 sec_level) if (smp_ltk_encrypt(conn, hcon->pending_sec_level)) return 0; + chan = conn->smp; + if (!chan) { + BT_ERR("SMP security requested but not available"); + return 1; + } + l2cap_chan_lock(chan); /* If SMP is already in progress ignore this request */ |