sched/core: Fix cpu.max vs. cpuhotplug deadlock
commitce48c146495a1a50e48cdbfbfaba3e708be7c07c
authorPeter Zijlstra <peterz@infradead.org>
Mon, 22 Jan 2018 21:53:28 +0000 (22 22:53 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 24 Jan 2018 09:03:44 +0000 (24 10:03 +0100)
tree6aabd7d32c16454175afdb2a20352056d9beb71a
parent1f07476ec143bbed7bf0b641749783b1094b4c4f
sched/core: Fix cpu.max vs. cpuhotplug deadlock

Tejun reported the following cpu-hotplug lock (percpu-rwsem) read recursion:

  tg_set_cfs_bandwidth()
    get_online_cpus()
      cpus_read_lock()

    cfs_bandwidth_usage_inc()
      static_key_slow_inc()
        cpus_read_lock()

Reported-by: Tejun Heo <tj@kernel.org>
Tested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20180122215328.GP3397@worktop
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/jump_label.h
kernel/jump_label.c
kernel/sched/fair.c