Message ID | 05fb7a41510f471f82aa1f3930ed3aac8abe2410.1649877511.git.andreyknvl@google.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | kasan, arm64, scs: collect stack traces from Shadow Call Stack | expand |
diff --git a/mm/kasan/common.c b/mm/kasan/common.c index 23b30fa6e270..00fef2e5fe90 100644 --- a/mm/kasan/common.c +++ b/mm/kasan/common.c @@ -97,7 +97,9 @@ depot_stack_handle_t kasan_save_stack(gfp_t flags, bool can_alloc) unsigned long entries[KASAN_STACK_DEPTH]; unsigned int nr_entries; - nr_entries = stack_trace_save(entries, ARRAY_SIZE(entries), 0); + nr_entries = stack_trace_save_shadow(entries, ARRAY_SIZE(entries)); + if (nr_entries < 0) + nr_entries = stack_trace_save(entries, ARRAY_SIZE(entries), 0); return __stack_depot_save(entries, nr_entries, flags, can_alloc); }