From: MyungJoo Ham <myungjoo.ham@samsung.com>
To: Kyungmin Park <kyungmin.park@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>
Cc: "kernel@collabora.com" <kernel@collabora.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Enric Balletbo i Serra <enric.balletbo@collabora.com>,
Ezequiel Garcia <ezequiel@collabora.com>
Subject: RE: [PATCH v2] PM / devfreq: Fix kernel oops on governor module load
Date: Mon, 24 Jun 2019 16:37:42 +0900 [thread overview]
Message-ID: <20190624073742epcms1p29979ff8c388b70e6e03b0e6f7ccf51db@epcms1p2> (raw)
In-Reply-To: <20190621213949.27018-1-ezequiel@collabora.com>
> A bit unexpectedly (but still documented), request_module may
> return a positive value, in case of a modprobe error.
> This is currently causing issues in the devfreq framework.
>
> When a request_module exits with a positive value, we currently
> return that via ERR_PTR. However, because the value is positive,
> it's not a ERR_VALUE proper, and is therefore treated as a
> valid struct devfreq_governor pointer, leading to a kernel oops.
>
> Fix this by returning -EINVAL if request_module returns a positive
> value.
>
> Fixes: b53b0128052ff ("PM / devfreq: Fix static checker warning in try_then_request_governor")
> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
> ---
> Changes from v1:
> * Rework the fix as suggested by Enric and Chanwoo,
> handling the return vaue.
> ---
> drivers/devfreq/devfreq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
prev parent reply other threads:[~2019-06-24 7:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-21 21:39 [PATCH v2] PM / devfreq: Fix kernel oops on governor module load Ezequiel Garcia
2019-06-22 10:46 ` Chanwoo Choi
2019-07-10 18:30 ` Ezequiel Garcia
2019-07-11 2:49 ` Chanwoo Choi
[not found] ` <CGME20190621214003epcas5p4682d7d258b3ec2ae92521111fe8864ab@epcms1p2>
2019-06-24 7:37 ` MyungJoo Ham [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=20190624073742epcms1p29979ff8c388b70e6e03b0e6f7ccf51db@epcms1p2 \
--to=myungjoo.ham@samsung.com \
--cc=cw00.choi@samsung.com \
--cc=enric.balletbo@collabora.com \
--cc=ezequiel@collabora.com \
--cc=kernel@collabora.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-pm@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;
as well as URLs for NNTP newsgroup(s).