]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: get_wchan(): solve possible race scenario due to parallel wakeup
authorKautuk Consul <kautuk.consul.1980@gmail.com>
Tue, 19 Apr 2016 10:18:21 +0000 (15:48 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 6 Oct 2017 09:51:52 +0000 (20:51 +1100)
commite7b9b48576c47d2598367ad8766112796ca8ae7c
tree410ee4122e075d177af46e049efa823b6b9f02b9
parentd5731097beeb11a5cc48fa51bebfc98f7fe1e7fa
powerpc: get_wchan(): solve possible race scenario due to parallel wakeup

Add a check for p->state == TASK_RUNNING so that any wake-ups on
task_struct p in the interim lead to 0 being returned by get_wchan().

Signed-off-by: Kautuk Consul <kautuk.consul.1980@gmail.com>
[mpe: Confirmed other architectures do similar]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/process.c