aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stackdepot.c
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2023-11-20 18:47:00 +0100
committerAndrew Morton <akpm@linux-foundation.org>2023-12-10 16:51:43 -0800
commit0c5d44a8142d1ede05943845793d3d8a2f10c338 (patch)
treecae8ec5fe426141fe163784c36c5ae15d9f8d229 /lib/stackdepot.c
parent4d07a037231c985f8c990c9cf1c304bbe31bb764 (diff)
downloadlinux-0c5d44a8142d1ede05943845793d3d8a2f10c338.tar.gz
lib/stackdepot: check disabled flag when fetching
Do not try fetching a stack trace from the stack depot if the stack_depot_disabled flag is enabled. Link: https://lkml.kernel.org/r/c3bfa3b7ab00b2e48ab75a3fbb9c67555777cb08.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov <andreyknvl@google.com> Reviewed-by: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Evgenii Stepanov <eugenis@google.com> Cc: Marco Elver <elver@google.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/stackdepot.c')
-rw-r--r--lib/stackdepot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/stackdepot.c b/lib/stackdepot.c
index 0eeaef4f25230..f8a8033e1dc80 100644
--- a/lib/stackdepot.c
+++ b/lib/stackdepot.c
@@ -483,7 +483,7 @@ unsigned int stack_depot_fetch(depot_stack_handle_t handle,
*/
kmsan_unpoison_memory(entries, sizeof(*entries));
- if (!handle)
+ if (!handle || stack_depot_disabled)
return 0;
if (parts.pool_index > pool_index_cached) {