[AVR32] show_trace: Only walk valid stack addresses
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Wed, 21 Feb 2007 12:08:06 +0000 (13:08 +0100)
committerHaavard Skinnemoen <hskinnemoen@atmel.com>
Wed, 7 Mar 2007 09:50:27 +0000 (10:50 +0100)
commit3338368e922a6686a3b3d6f4da07babd224788d4
treefa29c8aaef547723cb5f5f81fe60d441947481b6
parent9a596a6236e1b4d6c2e6105bd85eac19c9f4ec4c
[AVR32] show_trace: Only walk valid stack addresses

Terminate the frame pointer walk if (a) the address is outside the
task's kernel stack or (b) if the frame pointer isn't monotonically
increasing. Without this fix, show_trace() may enter an infinite
loop, walking through random data anywhere in memory.

Since any address within the kernel stack is guaranteed to be valid,
we may eliminate the __get_user() calls as well.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
arch/avr32/kernel/traps.c