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:	Fri, 05 Dec 2008 16:35:13 +0800
From:	Li Zefan <lizf@...fujitsu.com>
To:	Ken Chen <kenchen@...gle.com>
CC:	Paul Menage <menage@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [patch] export percpu cpuacct cgroup stats

Ken Chen wrote:
> On Thu, Dec 4, 2008 at 11:54 PM, Li Zefan <lizf@...fujitsu.com> wrote:
>>> +             seq_printf(m, "%llu ", percpu);
>> Should be:
>> +               seq_printf(m, "%llu ", (unsigned long long)percpu);
>>
>> Otherwsise:
>> kernel/sched.c: In function 'cpuacct_percpu_seq_read':
>> kernel/sched.c:9359: warning: format '%llu' expects type 'long long unsigned int',
>> but argument 3 has type 'u64'
> 
> huh, I was just wondering about the type case in cgroup_read_u64()
> when I was looking at it earlier.  That explains it.  Diff patch
> attached.
> 

Reviewed-by: Li Zefan <lizf@...fujitsu.com>

> diff --git a/kernel/sched.c b/kernel/sched.c
> index e32c094..055c54f 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -9356,7 +9356,7 @@ static int cpuacct_percpu_seq_read
>  		spin_lock_irq(&cpu_rq(i)->lock);
>  		percpu = *percpu_ptr(ca->cpuusage, i);
>  		spin_unlock_irq(&cpu_rq(i)->lock);
> -		seq_printf(m, "%llu ", percpu);
> +		seq_printf(m, "%llu ", (unsigned long long) percpu);
>  	}
>  	seq_printf(m, "\n");
>  	return 0;
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ