提交 5b10c8e4 编写于 作者: R Russell King 提交者: Russell King

[ARM] Fix stacktrace FP range checking

Fix an oops in the stacktrace code, caused by improper range checking.
We subtract 12 off 'fp' before testing to see if it's below the low
bound.  However, if 'fp' were zero before, it becomes a very large
positive number, causing this test to succeed where it should fail.
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 b91d8a12
......@@ -13,7 +13,7 @@ int walk_stackframe(unsigned long fp, unsigned long low, unsigned long high,
/*
* Check current frame pointer is within bounds
*/
if ((fp - 12) < low || fp + 4 >= high)
if (fp < (low + 12) || fp + 4 >= high)
break;
frame = (struct stackframe *)(fp - 12);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册