All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pauli Virtanen <pav@iki.fi>
To: linux-bluetooth@vger.kernel.org
Cc: Pauli Virtanen <pav@iki.fi>
Subject: [RFC PATCH 0/5] Bluetooth: enable context analysis
Date: Sat, 16 May 2026 14:14:32 +0300	[thread overview]
Message-ID: <cover.1778930064.git.pav@iki.fi> (raw)

Set up compiler context analysis that generate compiler warnings on
problems that Clang -Wthread-safety can detect:

https://docs.kernel.org/dev-tools/context-analysis.html

Clang 22, and probably Clang 23 [1] will be required.  Sparse locking
analysis support was removed in commit
5b63d0ae94ccfd64dcbdb693d88eb3650eb3c64c, this is its successor.

This series enables the analysis and adds minimal annotations to silence
some false positives.

Also, one patch to fix what looks like a legitimate locking issue in
iso.c.

In future, it probably is a good idea to make more use of it and add
__must_hold, __guarded_by etc annotations.

Kernel test robot appears to be checking for these, but not sure in what
trees [2]

BlueZ testbot doesn't check these currently but it's possible to add
https://github.com/bluez/action-ci/pull/4

[1] https://lore.kernel.org/all/CANpmjNN4O=W70sAc5gaVkTAFdrGGOW+XBMyuehfz3_QMiT=uCw@mail.gmail.com/
[2] https://lore.kernel.org/all/202605060005.JYWpZXr2-lkp@intel.com/

Pauli Virtanen (5):
  Bluetooth: af_bluetooth: Add minimal context analysis annotations
  Bluetooth: hci_core: Add minimal context analysis annotations
  Bluetooth: ISO: lock same hdev as what is released
  Bluetooth: L2CAP: Add minimal context analysis annotations
  Bluetooth: enable context analysis

 drivers/bluetooth/Makefile   |  2 ++
 net/bluetooth/Makefile       |  2 ++
 net/bluetooth/af_bluetooth.c |  7 +++++--
 net/bluetooth/hci_core.c     |  3 +++
 net/bluetooth/iso.c          | 14 ++++++++------
 net/bluetooth/l2cap_sock.c   |  1 +
 6 files changed, 21 insertions(+), 8 deletions(-)

-- 
2.54.0


             reply	other threads:[~2026-05-16 11:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-16 11:14 Pauli Virtanen [this message]
2026-05-16 11:14 ` [RFC PATCH 1/5] Bluetooth: af_bluetooth: Add minimal context analysis annotations Pauli Virtanen
2026-05-16 12:46   ` Bluetooth: enable context analysis bluez.test.bot
2026-05-16 11:14 ` [RFC PATCH 2/5] Bluetooth: hci_core: Add minimal context analysis annotations Pauli Virtanen
2026-05-16 11:14 ` [RFC PATCH 3/5] Bluetooth: ISO: lock same hdev as what is released Pauli Virtanen
2026-05-16 11:14 ` [RFC PATCH 4/5] Bluetooth: L2CAP: Add minimal context analysis annotations Pauli Virtanen
2026-05-16 11:14 ` [RFC PATCH 5/5] Bluetooth: enable context analysis Pauli Virtanen

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=cover.1778930064.git.pav@iki.fi \
    --to=pav@iki.fi \
    --cc=linux-bluetooth@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.