From: sashiko-bot@kernel.org
To: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org,
linux-input@vger.kernel.org, robh@kernel.org,
dmitry.torokhov@gmail.com
Subject: Re: [PATCH v3 05/10] Input: samsung-keypad - remove support for platform data
Date: Sun, 12 Jul 2026 02:22:21 +0000 [thread overview]
Message-ID: <20260712022222.5B6DB1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260711-samsung-kp-v3-5-b2fcaba77aff@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Premature IRQ enablement leads to unclocked hardware access and kernel panic.
--
--- Patch [5]: [PATCH v3 05/10] Input: samsung-keypad - remove support for platform data ---
commit 66287716c4c767b7655e9d4647ac5fd73fc2b713
Author: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Input: samsung-keypad - remove support for platform data
This commit removes platform data support from the samsung-keypad driver,
as there are no remaining users in the kernel. The driver now relies entirely
on generic device properties for configuration.
> diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c
> index cc34f0146161e..e54b3b9f2cf2e 100644
> --- a/drivers/input/keyboard/samsung-keypad.c
> +++ b/drivers/input/keyboard/samsung-keypad.c
[ ... ]
> @@ -424,7 +388,11 @@ static int samsung_keypad_probe(struct platform_device *pdev)
> return error;
> }
>
> - device_init_wakeup(&pdev->dev, pdata->wakeup);
> + wakeup = device_property_read_bool(dev, "wakeup-source") ||
> + /* legacy name */
> + device_property_read_bool(dev, "linux,input-wakeup");
> + device_init_wakeup(&pdev->dev, wakeup);
> +
> platform_set_drvdata(pdev, keypad);
>
> error = devm_pm_runtime_enable(&pdev->dev);
[Severity: High]
This is a pre-existing issue, but I noticed that the IRQ is requested
and unmasked before runtime PM is enabled.
In samsung_keypad_probe(), devm_request_threaded_irq() is called just before
this point without IRQF_NO_AUTOEN. If a pending interrupt is left by the
bootloader or a spurious interrupt occurs, it will fire immediately.
When samsung_keypad_irq() executes, it calls pm_runtime_get_sync() (which
skips enabling the clock because keypad->stopped is true at probe time) and
then accesses hardware registers:
drivers/input/keyboard/samsung-keypad.c:samsung_keypad_irq() {
...
do {
readl(keypad->base + SAMSUNG_KEYIFSTSCLR);
...
}
Can this unconditional access to unclocked peripheral registers trigger a
synchronous external abort and result in a kernel panic?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260711-samsung-kp-v3-0-b2fcaba77aff@gmail.com?part=5
next prev parent reply other threads:[~2026-07-12 2:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-12 2:12 [PATCH v3 00/10] Remove support for platform data from samsung keypad Dmitry Torokhov
2026-07-12 2:12 ` [PATCH v3 01/10] dt-bindings: input: samsung,s3c6410-keypad: introduce compact binding Dmitry Torokhov
2026-07-12 2:22 ` sashiko-bot
2026-07-12 2:12 ` [PATCH v3 02/10] Input: samsung-keypad - handle " Dmitry Torokhov
2026-07-12 2:24 ` sashiko-bot
2026-07-12 2:12 ` [PATCH v3 03/10] ARM: s3c: register and attach software nodes for Samsung gpio_chips Dmitry Torokhov
2026-07-12 2:24 ` sashiko-bot
2026-07-12 2:12 ` [PATCH v3 04/10] ARM: s3c: crag6410: switch keypad device to software properties Dmitry Torokhov
2026-07-12 2:12 ` [PATCH v3 05/10] Input: samsung-keypad - remove support for platform data Dmitry Torokhov
2026-07-12 2:22 ` sashiko-bot [this message]
2026-07-12 2:12 ` [PATCH v3 06/10] ARM: s3c: crag6410: use software nodes/properties to set up GPIO keys Dmitry Torokhov
2026-07-12 2:21 ` sashiko-bot
2026-07-12 2:12 ` [PATCH v3 07/10] mfd: wm831x: support software nodes for DCDC regulators Dmitry Torokhov
2026-07-12 2:20 ` sashiko-bot
2026-07-12 2:12 ` [PATCH v3 08/10] ARM: s3c: crag6410: convert PMIC DVS GPIO to software properties Dmitry Torokhov
2026-07-12 2:32 ` sashiko-bot
2026-07-12 2:12 ` [PATCH v3 09/10] ARM: s3c: crag6410: convert basic-mmio-gpio and LEDs " Dmitry Torokhov
2026-07-12 2:12 ` [PATCH v3 10/10] ARM: s3c: crag6410: convert remaining GPIO lookup tables to property entries Dmitry Torokhov
2026-07-12 12:30 ` [PATCH v3 00/10] Remove support for platform data from samsung keypad Krzysztof Kozlowski
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=20260712022222.5B6DB1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=robh@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