Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5973e5b9 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

sched: fix: don't take a mutex from interrupt context



print_cfs_stats is callable from interrupt context (sysrq), hence it should
not take mutexes. Change it to use RCU since the task group data is RCU
freed anyway.

Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 5fb5e6de
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1434,9 +1434,9 @@ static void print_cfs_stats(struct seq_file *m, int cpu)
#ifdef CONFIG_FAIR_GROUP_SCHED
	print_cfs_rq(m, cpu, &cpu_rq(cpu)->cfs);
#endif
	lock_task_group_list();
	rcu_read_lock();
	for_each_leaf_cfs_rq(cpu_rq(cpu), cfs_rq)
		print_cfs_rq(m, cpu, cfs_rq);
	unlock_task_group_list();
	rcu_read_unlock();
}
#endif