]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Fix get_frame_info() handing of function size
authorJinyang He <hejinyang@loongson.cn>
Thu, 21 Jan 2021 05:31:37 +0000 (13:31 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Mon, 25 Jan 2021 11:21:23 +0000 (12:21 +0100)
commit18ba24d3636e0bd55190fead48be586304d17945
tree3b96f70a07b08a9272b6578e6c2f70e10ec91a20
parent851c3d510e4c8a1feec4ed93ef2a497e20346606
MIPS: Fix get_frame_info() handing of function size

[1]: Commit be7777a62ee39 ("MIPS: Fix get_frame_info() handling of
                            microMIPS function size")
[2]: Commit b1040a517891d ("MIPS: Remove function size check in
                            get_frame_info()")

First patch added a constant to check the number of iterations against.
Second patch fixed the situation that info->func_size is zero.

However, func_size member became useless after the second commit. Without
ip_end, the get frame_size operation may be out of range although KALLSYMS
enabled. Thus, check func_size first. Then make ip_end be the sum of ip
and a constant (512) if func_size is equal to 0. Otherwise make ip_end be
the sum of ip and func_size.

Signed-off-by: Jinyang He <hejinyang@loongson.cn>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/kernel/process.c