diff --git a/kernel/sched/core.c b/kernel/sched/core.c index dfaefb175ba05..e6c65725b7ce0 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1252,7 +1252,8 @@ static void __init init_uclamp(void) mutex_init(&uclamp_mutex); for_each_possible_cpu(cpu) { - memset(&cpu_rq(cpu)->uclamp, 0, sizeof(struct uclamp_rq)); + memset(&cpu_rq(cpu)->uclamp, 0, + sizeof(struct uclamp_rq)*UCLAMP_CNT); cpu_rq(cpu)->uclamp_flags = 0; }