lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 29 Dec 2019 22:11:20 +0000
From:   Qais Yousef <qais.yousef@....com>
To:     Li Guanglei <guangleix.li@...il.com>
Cc:     mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, dietmar.eggemann@....com,
        rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
        linux-kernel@...r.kernel.org, guanglei.li@...soc.com
Subject: Re: [PATCH v01] sched/core: uclamp: fix rq.uclamp memory size of
 initialization

On 12/25/19 15:44, Li Guanglei wrote:
> From: Li Guanglei <guanglei.li@...soc.com>
> 
> uclamp_rq for each clamp id(UCLAMP_CNT) should be initialized when call

s/clamp id(UCLAMP_CNT)/UCLAMP_CNT/

> init_uclamp.
> 
> Signed-off-by: Li Guanglei <guanglei.li@...soc.com>

This need fixes tag

Fixes: 69842cba9ace ("sched/uclamp: Add CPU's clamp buckets refcountinga")

Otherwise this looks good to me.

Reviewed-by: Qais Yousef <qais.yousef@....com>

Thanks

--
Qais Yousef

> ---
>  kernel/sched/core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 44123b4..05f870b 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;
>  	}
>  
> -- 
> 2.7.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ