summaryrefslogtreecommitdiffstats
path: root/kernel/sched/sched.h
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2020-11-10 12:38:47 +0100
committerPeter Zijlstra <peterz@infradead.org>2021-10-05 15:51:58 +0200
commit1a7243ca4074beed97b68d7235a6e34862fc2cd6 (patch)
tree82c415b119e9d0d15584fe7687bbac31d77604d0 /kernel/sched/sched.h
parentsched: Provide Kconfig support for default dynamic preempt mode (diff)
downloadlinux-1a7243ca4074beed97b68d7235a6e34862fc2cd6.tar.xz
linux-1a7243ca4074beed97b68d7235a6e34862fc2cd6.zip
kthread: Move prio/affinite change into the newly created thread
With enabled threaded interrupts the nouveau driver reported the following: | Chain exists of: | &mm->mmap_lock#2 --> &device->mutex --> &cpuset_rwsem | | Possible unsafe locking scenario: | | CPU0 CPU1 | ---- ---- | lock(&cpuset_rwsem); | lock(&device->mutex); | lock(&cpuset_rwsem); | lock(&mm->mmap_lock#2); The device->mutex is nvkm_device::mutex. Unblocking the lockchain at `cpuset_rwsem' is probably the easiest thing to do. Move the priority reset to the start of the newly created thread. Fixes: 710da3c8ea7df ("sched/core: Prevent race condition between cpuset and __sched_setscheduler()") Reported-by: Mike Galbraith <efault@gmx.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/a23a826af7c108ea5651e73b8fbae5e653f16e86.camel@gmx.de
Diffstat (limited to 'kernel/sched/sched.h')
0 files changed, 0 insertions, 0 deletions