[Sound-open-firmware] [PATCH] debug: stack: fix stack dump lower limit.
Liam Girdwood
liam.r.girdwood at linux.intel.com
Mon Feb 26 12:38:50 CET 2018
Don't try and dump data outside of the stack.
Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
---
src/include/reef/debug.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/include/reef/debug.h b/src/include/reef/debug.h
index 9ffc6a8..6554a51 100644
--- a/src/include/reef/debug.h
+++ b/src/include/reef/debug.h
@@ -133,7 +133,7 @@ static inline void dump_stack(uint32_t p, void *addr, size_t offset,
{
extern void *__stack;
extern void *_stack_sentry;
- void *stack_bottom = (void *)&__stack;
+ void *stack_bottom = (void *)&__stack - sizeof(void *);
void *stack_limit = (void *)&_stack_sentry;
void *stack_top = arch_get_stack_ptr() + offset;
size_t size = stack_bottom - stack_top;
--
2.14.1
More information about the Sound-open-firmware
mailing list