Kernel: Disable kmalloc backtraces during backtrace generation

If kmalloc backtraces are enabled during backtracing, things don't go
super well when the backtrace code calls kmalloc()..

With this fixed, it's basically possible to get all kmalloc backtraces
on the debugger by running (as root):

sysctl kmalloc_stacks=1
This commit is contained in:
Andreas Kling 2019-08-07 20:35:41 +02:00
commit 308461ca9a
Notes: sideshowbarker 2024-07-19 12:50:20 +09:00

View file

@ -139,6 +139,7 @@ void dump_backtrace()
return; return;
} }
TemporaryChange change(in_dump_backtrace, true); TemporaryChange change(in_dump_backtrace, true);
TemporaryChange disable_kmalloc_stacks(g_dump_kmalloc_stacks, false);
u32 ebp; u32 ebp;
asm volatile("movl %%ebp, %%eax" asm volatile("movl %%ebp, %%eax"
: "=a"(ebp)); : "=a"(ebp));