summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-04-12 18:21:56 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-04-12 18:21:55 -0700
commit9c00a6d3a817ae2ad69de3f43e1ea81766ab403d (patch)
treeb4711162ace5b39562dc296e3377d03da7e1bfbe
parent0bf17f61782fda1e39602d86122c28e1e87a1b7e (diff)
parent5d3984c09f1dbc8021b35765c1fb307f6044642b (diff)
Merge "ANDROID: uid_sys_stats: Replace tasklist lock with RCU in uid_cputime_show"
-rw-r--r--drivers/misc/uid_sys_stats.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/uid_sys_stats.c b/drivers/misc/uid_sys_stats.c
index 0e6ab4e7c686..9af9be81224e 100644
--- a/drivers/misc/uid_sys_stats.c
+++ b/drivers/misc/uid_sys_stats.c
@@ -344,13 +344,13 @@ static int uid_cputime_show(struct seq_file *m, void *v)
uid_entry->active_utime = 0;
}
- read_lock(&tasklist_lock);
+ rcu_read_lock();
do_each_thread(temp, task) {
uid = from_kuid_munged(user_ns, task_uid(task));
if (!uid_entry || uid_entry->uid != uid)
uid_entry = find_or_register_uid(uid);
if (!uid_entry) {
- read_unlock(&tasklist_lock);
+ rcu_read_unlock();
rt_mutex_unlock(&uid_lock);
pr_err("%s: failed to find the uid_entry for uid %d\n",
__func__, uid);
@@ -360,7 +360,7 @@ static int uid_cputime_show(struct seq_file *m, void *v)
uid_entry->active_utime += utime;
uid_entry->active_stime += stime;
} while_each_thread(temp, task);
- read_unlock(&tasklist_lock);
+ rcu_read_unlock();
hash_for_each(hash_table, bkt, uid_entry, hash) {
cputime_t total_utime = uid_entry->utime +