Commit eb36c22e authored by Russell King's avatar Russell King

[ARM] Ensure backtrace terminates on corrupted frame pointers.

Prevent a corrupted kernel stack causing an infinite dumping of
backtrace.
parent 00356fb6
......@@ -82,11 +82,20 @@ ENTRY(c_backtrace)
teq r3, r2
bleq .Ldumpstm
teq frame, next
movne frame, next
teqne frame, #0
bne 3b
LOADREGS(fd, sp!, {r4 - r8, pc})
/*
* A zero next framepointer means we're done.
*/
teq next, #0
LOADREGS(eqfd, sp!, {r4 - r8, pc})
/*
* The next framepointer must be above the
* current framepointer.
*/
cmp next, frame
mov frame, next
bhi 3b
b 1007f
/*
* Fixup for LDMDB
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment