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

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

Merge "sched: Fix spinlock recursion in sched_exit()"

parents 4b01094b 4d09122c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9622,11 +9622,11 @@ void sched_exit(struct task_struct *p)
	reset_task_stats(p);
	p->ravg.mark_start = wallclock;
	p->ravg.sum_history[0] = EXITING_TASK_MARKER;
	free_task_load_ptrs(p);

	enqueue_task(rq, p, 0);
	clear_ed_task(p, rq);
	task_rq_unlock(rq, p, &rf);
	free_task_load_ptrs(p);
}
#endif /* CONFIG_SCHED_WALT */

+5 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1965,6 +1965,10 @@ void init_new_task_load(struct task_struct *p, bool idle_task)
	p->misfit = false;
}

/*
 * kfree() may wakeup kswapd. So this function should NOT be called
 * with any CPU's rq->lock acquired.
 */
void free_task_load_ptrs(struct task_struct *p)
{
	kfree(p->ravg.curr_window_cpu);