linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] lib/stackdepot.c: allow the stack trace hash to be zero
@ 2016-04-12 10:46 Alexander Potapenko
  2016-04-13  8:51 ` Andrey Ryabinin
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Potapenko @ 2016-04-12 10:46 UTC (permalink / raw)
  To: adech.fo, cl, dvyukov, akpm, ryabinin.a.a, kcc, iamjoonsoo.kim
  Cc: kasan-dev, linux-kernel, linux-mm

There's actually no point in reserving the zero hash value.

Reported-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
---
 lib/stackdepot.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/lib/stackdepot.c b/lib/stackdepot.c
index 654c9d8..9e0b031 100644
--- a/lib/stackdepot.c
+++ b/lib/stackdepot.c
@@ -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];
 
 	/*
-- 
2.8.0.rc3.226.g39d4020

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-13  8:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-12 10:46 [PATCH v1] lib/stackdepot.c: allow the stack trace hash to be zero Alexander Potapenko
2016-04-13  8:51 ` Andrey Ryabinin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox