CAUTION: This email comes from a non Wind River email account!Yes, currently it happens after patch 2/2 it starts happening via kmemleak,
Do not click links or open attachments unless you recognize the sender and know the content is safe.
On 8/10/23 09:47, Xiaolei Wang wrote:
The __stack_depot_save() may be used by some subsystems even beforeDoes that currently happen, or only after patch 2/2 it starts happening via
the stack depot is initialized.
kmemleak?
So add a check of stack_table inIn case it's only after 2/2 I don't think this is truly "Fixes"?
__stack_depot_save() to make sure no oops in this case.
Fixes: 56a61617dd22 ("mm: use stack_depot for recording kmemleak's backtrace")
Signed-off-by: Xiaolei Wang <xiaolei.wang@xxxxxxxxxxxxx>
---
lib/stackdepot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/stackdepot.c b/lib/stackdepot.c
index 2f5aa851834e..a0651d013a0d 100644
--- a/lib/stackdepot.c
+++ b/lib/stackdepot.c
@@ -376,7 +376,7 @@ depot_stack_handle_t __stack_depot_save(unsigned long *entries,
*/
nr_entries = filter_irq_stacks(entries, nr_entries);
- if (unlikely(nr_entries == 0) || stack_depot_disabled)
+ if (unlikely(nr_entries == 0) || stack_depot_disabled || unlikely(!stack_table))
goto fast_exit;
hash = hash_stack(entries, nr_entries);