From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Ikjoon Jang <ikjn@chromium.org>
Cc: linux-pm@vger.kernel.org,
"RafaelJ . Wysocki" <rafael.j.wysocki@intel.com>,
DanielLezcano <daniel.lezcano@linaro.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] BUG-REPORT: cpuidle: teo: intervals[] array index out
Date: Fri, 10 Jan 2020 12:13:28 +0100 [thread overview]
Message-ID: <2821853.MfSkROXiEm@kreacher> (raw)
In-Reply-To: <20200110015917.32825-1-ikjn@chromium.org>
On Friday, January 10, 2020 2:59:17 AM CET Ikjoon Jang wrote:
> This seems to be a simple bug in rotating array index.
That's correct.
Please repost the patch with a Signed-off-by tag, so I can apply it.
> ---
> drivers/cpuidle/governors/teo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpuidle/governors/teo.c b/drivers/cpuidle/governors/teo.c
> index de7e706efd46..6deaaf5f05b5 100644
> --- a/drivers/cpuidle/governors/teo.c
> +++ b/drivers/cpuidle/governors/teo.c
> @@ -198,7 +198,7 @@ static void teo_update(struct cpuidle_driver *drv, struct cpuidle_device *dev)
> * pattern detection.
> */
> cpu_data->intervals[cpu_data->interval_idx++] = measured_ns;
> - if (cpu_data->interval_idx > INTERVALS)
> + if (cpu_data->interval_idx >= INTERVALS)
> cpu_data->interval_idx = 0;
> }
>
>
prev parent reply other threads:[~2020-01-10 11:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 1:59 [PATCH] BUG-REPORT: cpuidle: teo: intervals[] array index out Ikjoon Jang
2020-01-10 11:13 ` Rafael J. Wysocki [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=2821853.MfSkROXiEm@kreacher \
--to=rjw@rjwysocki.net \
--cc=daniel.lezcano@linaro.org \
--cc=ikjn@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
/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.