From: libin <huawei.libin@huawei.com>
To: Jonghwan Choi <jhbird.choi@gmail.com>
Cc: <stable@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<jiang.liu@huawei.com>, <guohanjun@huawei.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Jonghwan Choi <jhbird.choi@samsung.com>
Subject: Re: [PATCH 3.8-stable] sched/debug: Fix sd->*_idx limit range avoiding overflow
Date: Tue, 16 Apr 2013 09:53:12 +0800 [thread overview]
Message-ID: <516CAF08.1090107@huawei.com> (raw)
In-Reply-To: <1366035328-4780-1-git-send-email-jhbird.choi@samsung.com>
On 2013/4/15 22:15, Jonghwan Choi wrote:
> From: libin <huawei.libin@huawei.com>
>
> This patch looks like it should be in the 3.8-stable tree, should we apply
> it?
>
yes, I think this patch should be applied to the 3.8-stable tree. Thanks.
Libin
> ------------------
>
> From: "libin <huawei.libin@huawei.com>"
>
> commit fd9b86d37a600488dbd80fe60cca46b822bff1cd upstream
>
> Commit 201c373e8e ("sched/debug: Limit sd->*_idx range on
> sysctl") was an incomplete bug fix.
>
> This patch fixes sd->*_idx limit range to [0 ~ CPU_LOAD_IDX_MAX-1]
> avoiding array overflow caused by setting sd->*_idx to CPU_LOAD_IDX_MAX
> on sysctl.
>
> Signed-off-by: Libin <huawei.libin@huawei.com>
> Cc: <jiang.liu@huawei.com>
> Cc: <guohanjun@huawei.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Link: http://lkml.kernel.org/r/51626610.2040607@huawei.com
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
> ---
> kernel/sched/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 26058d0..112a32a 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -4948,7 +4948,7 @@ static void sd_free_ctl_entry(struct ctl_table **tablep)
> }
>
> static int min_load_idx = 0;
> -static int max_load_idx = CPU_LOAD_IDX_MAX;
> +static int max_load_idx = CPU_LOAD_IDX_MAX-1;
>
> static void
> set_table_entry(struct ctl_table *entry,
>
next prev parent reply other threads:[~2013-04-16 1:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-15 14:15 [PATCH 3.8-stable] sched/debug: Fix sd->*_idx limit range avoiding overflow Jonghwan Choi
2013-04-16 1:53 ` libin [this message]
2013-04-16 9:15 ` Ingo Molnar
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=516CAF08.1090107@huawei.com \
--to=huawei.libin@huawei.com \
--cc=guohanjun@huawei.com \
--cc=jhbird.choi@gmail.com \
--cc=jhbird.choi@samsung.com \
--cc=jiang.liu@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=stable@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 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.