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

Commit 350e127d authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Todd Kjos
Browse files

UPSTREAM: sched/core: Add missing update_rq_clock() call in set_user_nice()



Address this rq-clock update bug:

  WARNING: CPU: 30 PID: 195 at ../kernel/sched/sched.h:797 set_next_entity()
  rq->clock_update_flags < RQCF_ACT_SKIP

  Call Trace:
    dump_stack()
    __warn()
    warn_slowpath_fmt()
    set_next_entity()
    ? _raw_spin_lock()
    set_curr_task_fair()
    set_user_nice.part.85()
    set_user_nice()
    create_worker()
    worker_thread()
    kthread()
    ret_from_fork()

Change-Id: I8fb2653b2d9cb3bbc1637c1bcbf1c0645752ef12
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
(cherry picked from commit 2fb8d36787affe26f3536c3d8ec094995a48037d)
Signed-off-by: default avatarQuentin Perret <quentin.perret@arm.com>
parent 0aed57e7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3921,6 +3921,8 @@ void set_user_nice(struct task_struct *p, long nice)
	 * the task might be in the middle of scheduling on another CPU.
	 */
	rq = task_rq_lock(p, &rf);
	update_rq_clock(rq);

	/*
	 * The RT priorities are set via sched_setscheduler(), but we still
	 * allow the 'normal' nice value to be set - but as expected