diff options
| author | Derek J. Clark <derekjohn.clark@gmail.com> | 2026-09-14 15:52:55 -0700 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2026-10-16 12:02:06 +0200 |
| commit | 6224755416e627badf69b330afec9ac6b85e5098 (patch) | |
| tree | 77363739c9445b634741b1bd91a0901fe5ed61c6 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 8ac42b2885322dc7fb03d88c5411e9dbd24f80d9 (diff) | |
HID: hid-lenovo-go-s: Bound stale reply window before reusing send_cmd_complete
mcu_property_out() reinits send_cmd_complete immediately after a
timeout is detected, before the next command that reuses it is sent.
If the MCU's reply to the timed-out command arrives after this reinit
but before the next command's wait begins, it silently satisfies the
next, unrelated command's wait instead of the one it actually answers,
handing that caller stale data with no way to detect the mismatch.
Track when a command has timed out via cmd_orphaned. Before the next
command reuses the completion, wait a bounded 25ms for a stale reply
to arrive and be consumed, then unconditionally clear the flag and
reinit the completion. This does not fully eliminate the window in
which an unrelated reply could still be received, but bounds it to
a short interval right before a new command is sent. Behavior matches
the solution to the same problem in hid-msi.
Fixes: a23f3497bf208c59ad ("HID: hid-lenovo-go-s: Add Lenovo Legion Go S Series HID Driver")
Cc: stable@vger.kernel.org
Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
