]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/livepatch: small cleanups in save_stack_trace_tsk_reliable()
authorJoe Lawrence <joe.lawrence@redhat.com>
Tue, 22 Jan 2019 15:57:23 +0000 (10:57 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 31 Jan 2019 05:43:38 +0000 (16:43 +1100)
commitbfe87555708d42a877109d321fd58168319c8b25
tree3b2a3eaf32d5be73e73d095ca4a9263cb4d69de7
parent64afe6d2c5da1d52b58e649f51d0bf6baa530eff
powerpc/livepatch: small cleanups in save_stack_trace_tsk_reliable()

Mostly cosmetic changes:

- Group common stack pointer code at the top
- Simplify the first frame logic
- Code stackframe iteration into for...loop construct
- Check for trace->nr_entries overflow before adding any into the array

Suggested-by: Nicolai Stange <nstange@suse.de>
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/stacktrace.c