mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 11:16:11 +00:00
stacktrace: don't crash on invalid stack trace structs
This patch makes the stacktrace printout code \warn when the entries pointer is unset rather than crashing when trying to access it in an attempt to make it a bit more robust. I was saving a stacktrace into an skb and forgot to copy it across skb copies... I have since fixed the code, but it would have been easier had the kernel not crashed in an interrupt. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
75d3bce2fc
commit
bfeeeeb991
1 changed files with 3 additions and 0 deletions
|
@ -13,6 +13,9 @@ void print_stack_trace(struct stack_trace *trace, int spaces)
|
|||
{
|
||||
int i, j;
|
||||
|
||||
if (WARN_ON(!trace->entries))
|
||||
return;
|
||||
|
||||
for (i = 0; i < trace->nr_entries; i++) {
|
||||
unsigned long ip = trace->entries[i];
|
||||
|
||||
|
|
Loading…
Reference in a new issue