* Re: [PATCH v3 6/6] Bluetooth: Add EKS Opportunistic Encryption support
[not found] <20261104221321.1200529-7-luiz.dentz@gmail.com>
@ 2026-11-05 14:47 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-05 14:47 UTC (permalink / raw)
To: Luiz Augusto von Dentz, linux-bluetooth; +Cc: llvm, oe-kbuild-all
Hi Luiz,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on bluetooth/master]
[cannot apply to linus/master v7.3 next-20261030]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Luiz-Augusto-von-Dentz/Bluetooth-Add-initial-support-for-HDT-PHY/20261104-171316
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
patch link: https://lore.kernel.org/r/20261104221321.1200529-7-luiz.dentz%40gmail.com
patch subject: [PATCH v3 6/6] Bluetooth: Add EKS Opportunistic Encryption support
config: arm-defconfig (https://download.01.org/0day-ci/archive/20261105/202611052210.pgQkfWp2-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 812626a41399a1d464a0d69627ab45c83b8ebfb9)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261105/202611052210.pgQkfWp2-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611052210.pgQkfWp2-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> net/bluetooth/hci_sync.c:8779:6: warning: calling function 'smp_pairing_in_progress' requires holding mutex 'hci_conn_hash_lookup_handle(hdev, data->handle)->hdev->lock' exclusively [-Wthread-safety-precise]
8779 | if (smp_pairing_in_progress(conn)) {
| ^
net/bluetooth/hci_sync.c:8779:6: note: found near match 'hdev->lock'
1 warning generated.
vim +8779 net/bluetooth/hci_sync.c
8754
8755 /* The opportunistic encryption is queued when the connection is set up, so
8756 * by the time it runs the connection may be gone, already encrypted, have
8757 * SMP encryption pending or SMP pairing in progress, so check again right
8758 * before sending the command and leave the link to SMP in those cases.
8759 *
8760 * HCI_CONN_OPP_ENCRYPT, without HCI_CONN_ENCRYPT, marks the request in
8761 * flight. HCI_CONN_ENCRYPT_PEND is not used for it, so SMP is not blocked
8762 * by it: SMP pairing over a link being encrypted works, and the encryption
8763 * started by SMP afterwards replaces the opportunistic key.
8764 */
8765 static int hci_le_eks_oppt_encrypt_sync(struct hci_dev *hdev, void *data)
8766 {
8767 struct hci_cp_le_enable_encrypt_v2 *cp = data;
8768 struct hci_conn *conn;
8769 int err;
8770
8771 hci_dev_lock(hdev);
8772
8773 conn = hci_conn_hash_lookup_handle(hdev, le16_to_cpu(cp->handle));
8774 if (!conn || conn->state != BT_CONNECTED ||
8775 test_bit(HCI_CONN_ENCRYPT, conn->flags) ||
8776 test_bit(HCI_CONN_ENCRYPT_PEND, conn->flags))
8777 goto unlock;
8778
> 8779 if (smp_pairing_in_progress(conn)) {
8780 bt_dev_dbg(hdev, "SMP in progress, skipping hcon %p", conn);
8781 goto unlock;
8782 }
8783
8784 if (test_and_set_bit(HCI_CONN_OPP_ENCRYPT, conn->flags))
8785 goto unlock;
8786
8787 /* Use the MIC length requested by now, or the default one if unset */
8788 cp->mic_len = conn->req_mic_len ? conn->req_mic_len :
8789 hdev->hdt_def_mic_len;
8790
8791 bt_dev_dbg(hdev, "starting EKS opportunistic encryption hcon %p", conn);
8792
8793 hci_dev_unlock(hdev);
8794
8795 err = hci_le_enable_encrypt_v2_sync(hdev, data);
8796 if (!err)
8797 return 0;
8798
8799 /* No result will come for a command that was not sent or failed */
8800 hci_dev_lock(hdev);
8801
8802 conn = hci_conn_hash_lookup_handle(hdev, le16_to_cpu(cp->handle));
8803 if (conn && !test_bit(HCI_CONN_ENCRYPT, conn->flags))
8804 clear_bit(HCI_CONN_OPP_ENCRYPT, conn->flags);
8805
8806 hci_dev_unlock(hdev);
8807
8808 return err;
8809
8810 unlock:
8811 hci_dev_unlock(hdev);
8812 return 0;
8813 }
8814
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-05 14:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20261104221321.1200529-7-luiz.dentz@gmail.com>
2026-11-05 14:47 ` [PATCH v3 6/6] Bluetooth: Add EKS Opportunistic Encryption support kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox