Skip to content
Snippets Groups Projects
Commit aeeff0aa authored by Jin Qian's avatar Jin Qian Committed by Ruchi Kandoi
Browse files

uid_cputime: fix overflow when printing cputime


cputime_t is u64. Use %llu instead of %u.

Bug: 22461683
Change-Id: Ia9a343a826e62cc73d2f61caf15651aee0233e9a
Signed-off-by: default avatarJin Qian <jinqian@google.com>
parent 78866184
Branches
Tags
No related merge requests found
...@@ -119,7 +119,7 @@ static int uid_stat_show(struct seq_file *m, void *v) ...@@ -119,7 +119,7 @@ static int uid_stat_show(struct seq_file *m, void *v)
uid_entry->active_stime; uid_entry->active_stime;
unsigned long long total_power = uid_entry->power + unsigned long long total_power = uid_entry->power +
uid_entry->active_power; uid_entry->active_power;
seq_printf(m, "%d: %u %u %llu\n", uid_entry->uid, seq_printf(m, "%d: %llu %llu %llu\n", uid_entry->uid,
cputime_to_usecs(total_utime), cputime_to_usecs(total_utime),
cputime_to_usecs(total_stime), cputime_to_usecs(total_stime),
total_power); total_power);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment