From: Thierry Reding <thierry.reding@gmail.com>
To: Hauke Mehrtens <hauke@hauke-m.de>
Cc: u.kleine-koenig@pengutronix.de, lee.jones@linaro.org,
ed.blake@sondrel.com, linux-pwm@vger.kernel.org, wigyori@uid0.hu
Subject: Re: [PATCH v2] pwm: img: Fix null pointer access in probe
Date: Wed, 23 Sep 2020 14:10:20 +0200 [thread overview]
Message-ID: <20200923121020.GB1848911@ulmo> (raw)
In-Reply-To: <20200820171425.7106-1-hauke@hauke-m.de>
[-- Attachment #1: Type: text/plain, Size: 803 bytes --]
On Thu, Aug 20, 2020 at 07:14:25PM +0200, Hauke Mehrtens wrote:
> dev_get_drvdata() is called in img_pwm_runtime_resume() before the
> driver data is set.
> When pm_runtime_enabled() returns false in img_pwm_probe() it calls
> img_pwm_runtime_resume() which results in a null pointer access.
>
> This patch fixes the problem by setting the driver data earlier in the
> img_pwm_probe() function.
>
> This crash was seen when booting the Imagination Technologies Creator
> Ci40 (Marduk) with kernel 5.4 in OpenWrt.
>
> Fixes: e690ae526216 ("pwm: img: Add runtime PM")
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> Acked-by: Lee Jones <lee.jones@linaro.org>
> ---
> drivers/pwm/pwm-img.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied, thanks.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2020-09-23 12:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 17:14 [PATCH v2] pwm: img: Fix null pointer access in probe Hauke Mehrtens
2020-09-23 12:10 ` Thierry Reding [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=20200923121020.GB1848911@ulmo \
--to=thierry.reding@gmail.com \
--cc=ed.blake@sondrel.com \
--cc=hauke@hauke-m.de \
--cc=lee.jones@linaro.org \
--cc=linux-pwm@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=wigyori@uid0.hu \
/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