Linux bluetooth development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	linux-bluetooth@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v3 6/6] Bluetooth: Add EKS Opportunistic Encryption support
Date: Thu, 5 Nov 2026 22:47:14 +0800	[thread overview]
Message-ID: <202611052210.pgQkfWp2-lkp@intel.com> (raw)
In-Reply-To: <20261104221321.1200529-7-luiz.dentz@gmail.com>

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

      reply	other threads:[~2026-11-05 14:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 22:13 [PATCH v3 0/6] Bluetooth: Add support for HDT and EKS Luiz Augusto von Dentz
2026-11-04 22:13 ` [PATCH v3 1/6] Bluetooth: Add initial support for HDT PHY Luiz Augusto von Dentz
2026-11-05  2:35   ` Bluetooth: Add support for HDT and EKS bluez.test.bot
2026-11-04 22:13 ` [PATCH v3 2/6] Bluetooth: ISO: Add extended QoS with the HDT rates Luiz Augusto von Dentz
2026-11-04 22:13 ` [PATCH v3 3/6] Bluetooth: Add initial support for EKS Luiz Augusto von Dentz
2026-11-04 22:13 ` [PATCH v3 4/6] Bluetooth: L2CAP: Add MIC length validation for HDT PHY Luiz Augusto von Dentz
2026-11-04 22:13 ` [PATCH v3 5/6] Bluetooth: Add HCI_OP_LE_SET_HDT_DEFAULT_PARAMS support Luiz Augusto von Dentz
2026-11-04 22:13 ` [PATCH v3 6/6] Bluetooth: Add EKS Opportunistic Encryption support Luiz Augusto von Dentz
2026-11-05 14:47   ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202611052210.pgQkfWp2-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=luiz.dentz@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox