]> git.baikalelectronics.ru Git - kernel.git/commit
sched/fair: Use RCU accessors consistently for ->numa_group
authorJann Horn <jannh@google.com>
Tue, 16 Jul 2019 15:20:47 +0000 (17:20 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 25 Jul 2019 13:37:05 +0000 (15:37 +0200)
commita0ecf6d87b5fee3496b880a99886acfda2dc51fa
treecde527557b6259487a11df5f30a652ab965cda41
parent9cf7a8c5bd7437ca0f3d5475a47cf65a7fda33a7
sched/fair: Use RCU accessors consistently for ->numa_group

The old code used RCU annotations and accessors inconsistently for
->numa_group, which can lead to use-after-frees and NULL dereferences.

Let all accesses to ->numa_group use proper RCU helpers to prevent such
issues.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will@kernel.org>
Fixes: 185f9dffd20e ("sched/numa: Use {cpu, pid} to create task groups for shared faults")
Link: https://lkml.kernel.org/r/20190716152047.14424-3-jannh@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/sched.h
kernel/sched/fair.c