Re: [PATCH 4.14 25/25] sched/fair: Use RCU accessors consistently for ->numa_group

From: Greg Kroah-Hartman
Date: Fri Aug 02 2019 - 11:37:58 EST


On Fri, Aug 02, 2019 at 11:39:57AM +0200, Greg Kroah-Hartman wrote:
> From: Jann Horn <jannh@xxxxxxxxxx>
>
> commit cb361d8cdef69990f6b4504dc1fd9a594d983c97 upstream.
>
> 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@xxxxxxxxxx>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Petr Mladek <pmladek@xxxxxxxx>
> Cc: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Will Deacon <will@xxxxxxxxxx>
> Fixes: 8c8a743c5087 ("sched/numa: Use {cpu, pid} to create task groups for shared faults")
> Link: https://lkml.kernel.org/r/20190716152047.14424-3-jannh@xxxxxxxxxx
> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

Oops, nope, this didn't apply, sorry about that, it needs to be properly
backported to 4.14.y and older before it can go here.

thanks,

greg k-h