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
parent b67200dfea
commit 308461ca9a

View file

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