From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@bootlin.com>,
Jason Cooper <jason@lakedaemon.net>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Viresh Kumar <viresh.kumar@linaro.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpufreq: dt: fix oops on armada37xx
Date: Sat, 20 Jun 2020 20:10:52 +0100 [thread overview]
Message-ID: <20200620191052.GA21708@mail.rc.ru> (raw)
In-Reply-To: <20200620175438.GS304147@lunn.ch>
On Sat, Jun 20, 2020 at 07:54:38PM +0200, Andrew Lunn wrote:
> On Sat, Jun 20, 2020 at 05:44:49PM +0100, Ivan Kokshaysky wrote:
> > Commit 0c868627e617e43a295d8 (cpufreq: dt: Allow platform specific
> > intermediate callbacks) added two function pointers to the
> > struct cpufreq_dt_platform_data. However, armada37xx_cpufreq_driver_init()
> > has this struct (pdata) located on the stack and uses only "suspend"
> > and "resume" fields. So these newly added "get_intermediate" and
> > "target_intermediate" pointers are uninitialized and contain arbitrary
> > non-null values, causing all kinds of trouble.
> >
> > For instance, here is an oops on espressobin after an attempt to change
> > the cpefreq governor:
> >
> > [ 29.174554] Unable to handle kernel execute from non-executable memory at virtual address ffff00003f87bdc0
> > ...
> > [ 29.269373] pc : 0xffff00003f87bdc0
> > [ 29.272957] lr : __cpufreq_driver_target+0x138/0x580
> > ...
> >
> > Fixed by zeroing out pdata before use.
> >
> > Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
>
> Hi Ivan
>
> A Fixes: tag would be good.
Hi Andrew,
I'm not sure that "Fixes:" would be appropriate here - commit 0c868627e617
is fine by itself, it just revealed a bug in older code.
Thanks for reviewing,
Ivan.
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
>
> Andrew
next prev parent reply other threads:[~2020-06-20 19:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-20 16:44 [PATCH] cpufreq: dt: fix oops on armada37xx Ivan Kokshaysky
2020-06-20 17:54 ` Andrew Lunn
2020-06-20 19:10 ` Ivan Kokshaysky [this message]
2020-06-22 2:21 ` Viresh Kumar
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=20200620191052.GA21708@mail.rc.ru \
--to=ink@jurassic.park.msu.ru \
--cc=andrew@lunn.ch \
--cc=gregory.clement@bootlin.com \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=sebastian.hesselbarth@gmail.com \
--cc=viresh.kumar@linaro.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 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.