]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Make /proc/self/stack always print the current stack
authorThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Mon, 27 Mar 2017 19:32:33 +0000 (16:32 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 28 Mar 2017 03:43:59 +0000 (14:43 +1100)
commit8288f9c9a1087c1d47ec63b0a721dfc755c2f3f9
tree679060e2fcf32fb8aea70fb3d170769a831664a8
parentdf979348dc496be1d6ad226fbd9e9253ceba5a45
powerpc: Make /proc/self/stack always print the current stack

For the current task, the kernel stack would only tell the last time the
process was rescheduled, if ever. Use the current stack pointer for the
current task.

Otherwise, every once in a while, the stacktrace printed when reading
/proc/self/stack would look like the process is running in userspace,
while it's not, which some may consider as a bug.

This is also consistent with some other architectures, like x86 and arm,
at least.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/stacktrace.c