Skip to content
Commit fd9b86d3 authored by libin's avatar libin Committed by Ingo Molnar
Browse files

sched/debug: Fix sd->*_idx limit range avoiding overflow



Commit 201c373e ("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: default avatarLibin <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: default avatarIngo Molnar <mingo@kernel.org>
parent a1cbcaa9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment