Re: [PATCH] sched/rt: Add a new sysctl to control uclamp_util_min

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 09, 2020 at 01:00:58PM +0000, Qais Yousef wrote:
> On 01/08/20 14:44, Peter Zijlstra wrote:

> > Did cpu_uclamp_write() forget to check for input<0 ?
> 
> Hmm just tried that and it seems so
> 
> # echo -1 > cpu.uclamp.min
> # cat cpu.uclamp.min
> 42949671.96
> 
> capacity_from_percent(); we check for
> 
> 7301                 if (req.percent > UCLAMP_PERCENT_SCALE) {
> 7302                         req.ret = -ERANGE;
> 7303                         return req;
> 7304                 }
> 
> But req.percent is s64, maybe it should be u64?

		if ((u64)req.percent > UCLAMP_PERCENT_SCALE)

should do, I think.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux