From: Maoyi Xie <maoyixie.tju@gmail.com>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <bentiss@kernel.org>,
linux-input@vger.kernel.org, stable@vger.kernel.org
Subject: [PATCH v2 0/2] HID: intel-ish-hid: Size the buffers for a later, larger response
Date: Wed, 25 Nov 2026 17:06:31 +0800 [thread overview]
Message-ID: <20261125090633.1385386-1-maoyixie.tju@gmail.com> (raw)
Both patches fix buffers in process_recv() that are allocated for the
first firmware response and then reused for later, larger ones.
A pending patch [1] limits hid_dev_count to MAX_HID_DEVICES, and it is
still needed with this series. Patch 2 does not depend on [1], so it
allocates U8_MAX entries (2295 bytes). With [1] applied first,
MAX_HID_DEVICES entries would be enough.
The series is based on hid.git for-7.4/upstream-fixes. In mainline,
patch 2 conflicts with the treewide devm_kmalloc_obj() conversion
(4dd10fbbeb9c). I can send a version for mainline if you prefer.
I used an LLM to help write the harness and these patches.
Changes in v2:
- Patch 1 ignores a response whose done flag is already set.
- Patch 2 allocates hid_devices once for the largest count and does
not reallocate it. The subject of patch 2 and of this letter changed
with that.
- Both changes follow the Sashiko review of v1.
- v1: https://lore.kernel.org/linux-input/20261123092816.2200718-1-maoyixie.tju@gmail.com/
[1] https://lore.kernel.org/all/tencent_130404E5ABECE66E8D0E70D8E6892C751C0A@qq.com/
Maoyi Xie (2):
HID: intel-ish-hid: Reallocate the descriptor buffers for a longer
response
HID: intel-ish-hid: Allocate hid_devices for the largest device count
drivers/hid/intel-ish-hid/ishtp-hid-client.c | 27 ++++++++++++--------
1 file changed, 16 insertions(+), 11 deletions(-)
base-commit: 10bc1d627c297097cfdc099377f8a13efdfffd86
--
2.34.1
next reply other threads:[~2026-11-25 9:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 9:06 Maoyi Xie [this message]
2026-11-25 9:06 ` [PATCH v2 1/2] HID: intel-ish-hid: Reallocate the descriptor buffers for a longer response Maoyi Xie
2026-12-04 5:52 ` Zhang Lixu
2026-12-04 19:02 ` Srinivas Pandruvada
2026-11-25 9:06 ` [PATCH v2 2/2] HID: intel-ish-hid: Allocate hid_devices for the largest device count Maoyi Xie
2026-12-04 6:42 ` Zhang Lixu
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=20261125090633.1385386-1-maoyixie.tju@gmail.com \
--to=maoyixie.tju@gmail.com \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=stable@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.