linux/kernel/sched
Qais Yousef 2c0000f409 sched/uclamp: Fix a deadlock when enabling uclamp static key
[ Upstream commit e65855a52b ]

The following splat was caught when setting uclamp value of a task:

  BUG: sleeping function called from invalid context at ./include/linux/percpu-rwsem.h:49

   cpus_read_lock+0x68/0x130
   static_key_enable+0x1c/0x38
   __sched_setscheduler+0x900/0xad8

Fix by ensuring we enable the key outside of the critical section in
__sched_setscheduler()

Fixes: 46609ce227 ("sched/uclamp: Protect uclamp fast path code with static key")
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200716110347.19553-4-qais.yousef@arm.com
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-03 11:26:49 +02:00
..
Makefile
autogroup.c
autogroup.h
clock.c
completion.c
core.c sched/uclamp: Fix a deadlock when enabling uclamp static key 2020-09-03 11:26:49 +02:00
cpuacct.c
cpudeadline.c
cpudeadline.h
cpufreq.c
cpufreq_schedutil.c sched/uclamp: Protect uclamp fast path code with static key 2020-09-03 11:26:49 +02:00
cpupri.c
cpupri.h
cputime.c
deadline.c sched/deadline: Initialize ->dl_boosted 2020-06-30 15:37:02 -04:00
debug.c sched/debug: Make sd->flags sysctl read-only 2020-07-09 09:37:50 +02:00
fair.c sched/fair: Fix NOHZ next idle balance 2020-08-19 08:15:53 +02:00
features.h
idle.c
isolation.c
loadavg.c
membarrier.c
pelt.c
pelt.h
psi.c
rt.c sched: Defend cfs and rt bandwidth quota against overflow 2020-06-22 09:31:07 +02:00
sched-pelt.h
sched.h sched/uclamp: Protect uclamp fast path code with static key 2020-09-03 11:26:49 +02:00
stats.c
stats.h
stop_task.c
swait.c
topology.c sched: correct SD_flags returned by tl->sd_flags() 2020-08-19 08:15:54 +02:00
wait.c
wait_bit.c