From: sashiko-bot@kernel.org
To: "Lee Jones" <lee@kernel.org>, linux-input@vger.kernel.org
Cc: dmitry.torokhov@gmail.com
Subject: Re: [PATCH 04/10] Input: matrix_keypad - only stop and start active device across sleep
Date: Mon, 23 Nov 2026 18:42:45 +0000 [thread overview]
Message-ID: <sashiko-outbox-229858@kernel.org> (raw)
In-Reply-To: <20261123183200.3900004-5-lee@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] Input: matrix_keypad - Fixes trailer cites 7d0f351da460 instead
of bab7614d6d1b
--
commit 6307b7026ba23f150e88470188dcf8ceefd4969d
Author: Lee Jones <lee@kernel.org>
> Input: matrix_keypad - only stop and start active device across sleep
>
> matrix_keypad_suspend() and matrix_keypad_resume() unconditionally call
> matrix_keypad_stop() and matrix_keypad_start() without holding
> input_dev->mutex or checking whether the input device is active.
>
> When the keypad has no open users (or is inhibited), row interrupts are
> already disabled and keypad->stopped is true. Suspending calls
> disable_row_irqs() a second time, unbalancing the IRQ disable depth, and
> resuming clears keypad->stopped and schedules keypad->work. If the
> device is subsequently unbound while still unopened, Input core skips
> the close callback (matrix_keypad_stop()) during unregistration, leaving
> keypad->work pending or running after devres frees struct matrix_keypad.
>
> Acquire input_dev->mutex in both sleep callbacks and only stop or start
> scanning when input_device_enabled() is true.
>
> Fixes: 7d0f351da460 ("Input: matrix_keypad - switch to using managed resources")
> Closes: https://sashiko.dev/#/bug/linux-340f2a74-becb-415d-b1c2-6da8f05a8bd8
> Cc: stable@vger.kernel.org
> Signed-off-by: Lee Jones <lee@kernel.org>
[Severity: Low]
Should the Fixes tag reference bab7614d6d1b ("Input: add support for
generic GPIO-based matrix keypad") instead?
7d0f351da460 ("Input: matrix_keypad - switch to using managed resources")
only converted allocations to devm_* and removed matrix_keypad_remove(),
which never stopped or flushed keypad->work for an unopened device anyway.
The unconditional matrix_keypad_stop() and matrix_keypad_start() calls in
the suspend and resume paths have been present since the driver was added
in bab7614d6d1b ("Input: add support for generic GPIO-based matrix
keypad").
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123183200.3900004-1-lee@kernel.org?part=4
next prev parent reply other threads:[~2026-11-23 18:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 18:31 [PATCH 00/10] Input: assorted bug fixes across input drivers Lee Jones
2026-11-23 18:31 ` [PATCH 01/10] Input: matrix_keypad - validate GPIO counts against matrix limits Lee Jones
2026-11-23 18:31 ` [PATCH 02/10] Input: cyapa - validate firmware image size in cyapa_pip_check_fw() Lee Jones
2026-11-23 18:31 ` [PATCH 03/10] Input: applespi - cancel touchpad registration work on removal Lee Jones
2026-11-23 18:31 ` [PATCH 04/10] Input: matrix_keypad - only stop and start active device across sleep Lee Jones
2026-11-23 18:42 ` sashiko-bot [this message]
2026-11-23 18:31 ` [PATCH 05/10] Input: stinger - zero-initialise driver state in stinger_connect() Lee Jones
2026-11-23 18:31 ` [PATCH 06/10] Input: synaptics-rmi4 - check for NULL drvdata in rmi_set_attn_data() Lee Jones
2026-11-23 18:31 ` [PATCH 07/10] Input: axp20x-pek - skip IRQ handling during sleep without input device Lee Jones
2026-11-23 18:31 ` [PATCH 08/10] Input: mt6779-keypad - enable keypad clock before programming registers Lee Jones
2026-11-23 18:31 ` [PATCH 09/10] Input: pinephone-keyboard - request IRQ before registering input device Lee Jones
2026-11-23 18:31 ` [PATCH 10/10] Input: wacom_w8001 - use reinit_completion() in w8001_command() Lee Jones
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=sashiko-outbox-229858@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=lee@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox