From: Kyle Pepper <cochcoder@proton.me>
To: linux-bluetooth@vger.kernel.org
Cc: marcel@holtmann.org, luiz.dentz@gmail.com
Subject: [PATCH v2 0/3] shared/gatt-client: Track internal discovery reads
Date: Wed, 11 Nov 2026 21:42:55 +0000 [thread overview]
Message-ID: <cover.1794432472.git.cochcoder@proton.me> (raw)
In-Reply-To: <20261107065854.2147141-1-cochcoder@proton.me>
Track Server Features and discovery Database Hash reads in pending_requests
so client cancellation releases them before the client is freed.
Patch 1 adds shared request support. Patches 2 and 3 fix each read with
separate native ATT tests. Both depend only on patch 1; either fix and its
tests can be reverted independently.
Changes in v2:
- Reuse pending_requests instead of adding per-read client fields.
- Separate shared support from each fix and its tests.
- Test queued, pending and continued reads. Cache Server Features in the
Database Hash tests so they exercise that fix independently.
- Rebase onto current master, preserving its GATT parser updates.
GCC and Clang ASan/UBSan and GCC LTO: 236 passed, zero failed, one not run.
All six regressions reproduce the use-after-free on the unchanged base.
Removing either fix reproduces only that read's three regressions; the
other three still pass. Both reverts apply cleanly. Checkpatch passes.
Native make check passes all 35 programs with Valgrind disabled; the host's
Valgrind crashes in the dynamic loader before executing tests.
Previous version:
https://lore.kernel.org/linux-bluetooth/20261107065854.2147141-1-cochcoder@proton.me/
Kyle Pepper (3):
shared/gatt-client: Support pending GATT helper requests
shared/gatt-client: Track pending Server Features reads
shared/gatt-client: Track pending discovery Database Hash reads
src/shared/gatt-client.c | 58 +++++++++++++++++++++++++-------
src/shared/gatt-helpers.c | 26 ++++++++++++---
src/shared/gatt-helpers.h | 7 ++++
unit/test-gatt.c | 70 ++++++++++++++++++++++++++++++++++++++-
4 files changed, 144 insertions(+), 17 deletions(-)
base-commit: 9659adb6819d7e0284d0d2ba226a3894423d8db4
--
2.56.0
next prev parent reply other threads:[~2026-11-11 21:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 6:59 [PATCH] shared/gatt-client: Cancel discovery read-by-type requests Kyle Pepper
2026-11-07 8:45 ` bluez.test.bot
2026-11-07 20:53 ` [PATCH] " Luiz Augusto von Dentz
2026-11-11 21:42 ` Kyle Pepper [this message]
2026-11-11 21:43 ` [PATCH v2 1/3] shared/gatt-client: Support pending GATT helper requests Kyle Pepper
2026-11-12 1:58 ` shared/gatt-client: Track internal discovery reads bluez.test.bot
2026-11-11 21:43 ` [PATCH v2 2/3] shared/gatt-client: Track pending Server Features reads Kyle Pepper
2026-11-11 21:44 ` [PATCH v2 3/3] shared/gatt-client: Track pending discovery Database Hash reads Kyle Pepper
2026-11-12 17:50 ` [PATCH v2 0/3] shared/gatt-client: Track internal discovery reads patchwork-bot+bluetooth
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.1794432472.git.cochcoder@proton.me \
--to=cochcoder@proton.me \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.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.