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

Commit 3b5dc311 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched/rt: Prevent leaking kernel address"

parents a309e793 dd427586
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -914,15 +914,30 @@ static void dump_throttled_rt_tasks(struct rt_rq *rt_rq)
	char *pos = buf;
	char *end = buf + sizeof(buf);
	int idx;
	struct rt_bandwidth *rt_b = sched_rt_bandwidth(rt_rq);

	pos += snprintf(pos, sizeof(buf),
		"sched: RT throttling activated for rt_rq %p (cpu %d)\n",
		"sched: RT throttling activated for rt_rq %pK (cpu %d)\n",
		rt_rq, cpu_of(rq_of_rt_rq(rt_rq)));

	pos += snprintf(pos, end - pos,
			"rt_period_timer: expires=%lld now=%llu period=%llu\n",
			hrtimer_get_expires_ns(&rt_b->rt_period_timer),
			ktime_get_ns(), sched_rt_period(rt_rq));

	if (bitmap_empty(array->bitmap, MAX_RT_PRIO))
		goto out;

	pos += snprintf(pos, end - pos, "potential CPU hogs:\n");
#ifdef CONFIG_SCHED_INFO
	if (sched_info_on())
		pos += snprintf(pos, end - pos,
				"current %s (%d) is running for %llu nsec\n",
				current->comm, current->pid,
				rq_clock(rq_of_rt_rq(rt_rq)) -
				current->sched_info.last_arrival);
#endif

	idx = sched_find_first_bit(array->bitmap);
	while (idx < MAX_RT_PRIO) {
		list_for_each_entry(rt_se, array->queue + idx, run_list) {