Go to file
Qais Yousef f0feeeff10 sched/uclamp: Fix a deadlock when enabling uclamp static key
[ Upstream commit e65855a52b479f98674998cb23b21ef5a8144b04 ]

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: 46609ce22703 ("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>
2021-03-16 16:34:55 +08:00
Documentation kbuild: support LLVM=1 to switch the default tools to Clang/LLVM 2021-03-16 16:34:25 +08:00
LICENSES Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
arch arm64: Fix __cpu_logical_map undefined issue 2021-03-16 16:34:54 +08:00
block iocost: Fix check condition of iocg abs_vdebt 2021-03-16 16:33:18 +08:00
certs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
crypto crypto: algif_aead - fix uninitialized ctx->init 2021-03-16 16:34:22 +08:00
drivers Revert "ath10k: fix DMA related firmware crashes on multiple devices" 2021-03-16 16:34:54 +08:00
fs hugetlbfs: prevent filesystem stacking of hugetlbfs 2021-03-16 16:34:53 +08:00
include efi: provide empty efi_enter_virtual_mode implementation 2021-03-16 16:34:54 +08:00
init x86: Fix early boot crash on gcc-10, third try 2021-03-16 16:28:02 +08:00
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index 2021-03-16 16:27:51 +08:00
kernel sched/uclamp: Fix a deadlock when enabling uclamp static key 2021-03-16 16:34:55 +08:00
lib test_kmod: avoid potential double free in trigger_config_run_type() 2021-03-16 16:34:21 +08:00
mm mm/hugetlb: fix calculation of adjust_range_if_pmd_sharing_possible 2021-03-16 16:34:42 +08:00
net net/sched: act_ct: Fix skb double-free in tcf_ct_handle_fragments() error flow 2021-03-16 16:34:44 +08:00
package config/arm64: OPEN CONFIG_PSI and phytium configs 2021-03-16 11:02:59 +08:00
samples bpf: Fix fds_example SIGSEGV error 2021-03-16 16:33:24 +08:00
scripts kconfig: qconf: fix signal connection to invalid slots 2021-03-16 16:34:39 +08:00
security Smack: prevent underflow in smk_set_cipso() 2021-03-16 16:33:40 +08:00
sound ALSA: hda: Add support for Loongson 7A1000 controller 2021-03-16 16:34:50 +08:00
tools selftests/powerpc: Purge extra count_pmc() calls of ebb selftests 2021-03-16 16:34:49 +08:00
usr Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
virt KVM: arm64: Only reschedule if MMU_NOTIFIER_RANGE_BLOCKABLE is not set 2021-03-16 16:34:42 +08:00
.clang-format Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.cocciconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.get_maintainer.ignore Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.gitattributes Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.gitignore Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
COPYING Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
CREDITS Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kbuild Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
MAINTAINERS Documentation/llvm: add documentation on building w/ Clang/LLVM 2021-03-16 16:34:24 +08:00
Makefile kbuild: support LLVM=1 to switch the default tools to Clang/LLVM 2021-03-16 16:34:25 +08:00
README Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
README.md Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
backport_remove_lists.txt Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tools_key.pub Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00

README.md

Tencent Linux Kernel 4.0