From: Oleg Keri <okerixx@gmail.com>
To: "Derek J. Clark" <derekjohn.clark@gmail.com>,
Mark Pearson <mpearson-lenovo@squebb.ca>,
Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <bentiss@kernel.org>,
Hans de Goede <hansg@kernel.org>,
Bernhard Seibold <mail@bernhard-seibold.de>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] HID: lenovo: two ordering fixes in remove() and tpkbd probe
Date: Thu, 10 Sep 2026 17:10:49 +0200 [thread overview]
Message-ID: <20260910151051.12975-1-okerixx@gmail.com> (raw)
Two long-standing ordering bugs in hid-lenovo, both pointed out by the
Sashiko review of an unrelated patch of mine [1]. Neither is specific to
any recent change; the first dates from 2020, the second from the original
2012 trackpoint keyboard driver.
Patch 1: lenovo_remove() cancels the tablet keyboards' fn_lock_sync_work
while the hardware is still delivering the events that re-queue it, so a
key press in that window leaves the work pending across the devres free
of its data. Stop the hardware before the per-model teardown.
Patch 2: lenovo_probe_tpkbd() exposes sysfs attributes before allocating
the drvdata they dereference. Allocate first.
Compile-tested only: I have neither a ThinkPad 10 Ultrabook Keyboard nor a
ThinkPad USB Keyboard with TrackPoint. Both changes are pure reorderings
of existing calls.
[1] https://lore.kernel.org/all/20260910064345.9BF1E1F000FF@smtp.kernel.org/
Oleg Keri (2):
HID: lenovo: stop the hardware before the per-model teardown
HID: lenovo: allocate the trackpoint drvdata before exposing its sysfs
attributes
drivers/hid/hid-lenovo.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
--
2.55.0
base-commit: df2908090cda368b01ff43709f51890076c56157
next reply other threads:[~2026-09-10 15:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 15:10 Oleg Keri [this message]
2026-09-10 15:10 ` [PATCH 1/2] HID: lenovo: stop the hardware before the per-model teardown Oleg Keri
2026-09-10 15:10 ` [PATCH 2/2] HID: lenovo: allocate the trackpoint drvdata before exposing its sysfs attributes Oleg Keri
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=20260910151051.12975-1-okerixx@gmail.com \
--to=okerixx@gmail.com \
--cc=bentiss@kernel.org \
--cc=derekjohn.clark@gmail.com \
--cc=hansg@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@bernhard-seibold.de \
--cc=mpearson-lenovo@squebb.ca \
/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.