Skip to content

Commit

Permalink
lib/stackdepot.c: allow the stack trace hash to be zero
Browse files Browse the repository at this point in the history
Do not bail out from depot_save_stack() if the stack trace has zero hash.
Initially depot_save_stack() silently dropped stack traces with zero
hashes, however there's actually no point in reserving this zero value.

Reported-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Alexander Potapenko <glider@google.com>
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Alexander Potapenko authored and Linus Torvalds committed Apr 29, 2016
1 parent 99f23c2 commit 33334e2
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/stackdepot.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,6 @@ depot_stack_handle_t depot_save_stack(struct stack_trace *trace,
goto fast_exit;

hash = hash_stack(trace->entries, trace->nr_entries);
/* Bad luck, we won't store this stack. */
if (hash == 0)
goto exit;

bucket = &stack_table[hash & STACK_HASH_MASK];

/*
Expand Down

0 comments on commit 33334e2

Please sign in to comment.