summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/cpuset.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 6aa5bbb5f33b..1a675e446ef2 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -2678,15 +2678,15 @@ static int proc_cpuset_show(struct seq_file *m, void *unused_v)
goto out_free;
retval = -EINVAL;
- mutex_lock(&cpuset_mutex);
+ rcu_read_lock();
css = task_subsys_state(tsk, cpuset_subsys_id);
retval = cgroup_path(css->cgroup, buf, PAGE_SIZE);
+ rcu_read_unlock();
if (retval < 0)
- goto out_unlock;
+ goto out_put_task;
seq_puts(m, buf);
seq_putc(m, '\n');
-out_unlock:
- mutex_unlock(&cpuset_mutex);
+out_put_task:
put_task_struct(tsk);
out_free:
kfree(buf);