From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: linux-input@vger.kernel.org
Cc: Andrew Duggan <aduggan@synaptics.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: synaptics-rmi4 - fix GPF in suspend and resume when unbound
Date: Thu, 6 Aug 2026 11:39:41 -0700 [thread overview]
Message-ID: <anTUTsHmD1gv1UZn@google.com> (raw)
In-Reply-To: <anQe8UiyUR4x0flD@google.com>
On Wed, Aug 05, 2026 at 10:44:23PM -0700, Dmitry Torokhov wrote:
> Transport drivers (such as rmi_i2c and rmi_spi) invoke
> rmi_driver_suspend() and rmi_driver_resume() on their child rmi_dev
> device during system power management events. However, transport drivers
> are fully registered and operational even if the physical RMI driver
> failed to bind or probe the rmi_dev device.
>
> When rmi_driver_suspend() or rmi_driver_resume() is called on an unbound
> rmi_dev, dev_get_drvdata() returns NULL. Calling rmi_disable_irq() or
> rmi_enable_irq() without driver data attached causes a NULL pointer
> dereference and General Protection Fault when attempting to lock
> data->enabled_mutex.
>
> Fix this by checking if driver data is attached to rmi_dev in
> rmi_driver_suspend() and rmi_driver_resume(), exiting early if
> no driver data is present.
Note that better fix would be to have RMI driver implement PM methods
(suspend, resume) but that requires more careful planning, especially
around RMI-HID.
Thanks.
--
Dmitry
prev parent reply other threads:[~2026-08-06 18:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 5:44 [PATCH] Input: synaptics-rmi4 - fix GPF in suspend and resume when unbound Dmitry Torokhov
2026-08-06 18:39 ` Dmitry Torokhov [this message]
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=anTUTsHmD1gv1UZn@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=aduggan@synaptics.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox