Skip to content

Commit

Permalink
lib/stackdepot: check disabled flag when fetching
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrey Konovalov authored and Andrew Morton committed Dec 11, 2023
1 parent 4d07a03 commit 0c5d44a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/stackdepot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0c5d44a

Please sign in to comment.