提交 23af7cf9 创建 作者: Austin Clements's avatar Austin Clements

Fix the same bug when getting a slab's name in ksalloc

Previously, we always used the name of CPU 0's kmem for a slab (owing to the same type of pointer decay problem fixed by the last commit). This is why all mtrace labels are called things like "0kstack" instead of having the right CPU number.
上级 bc0ff894
...@@ -228,7 +228,7 @@ kalloc(const char *name) ...@@ -228,7 +228,7 @@ kalloc(const char *name)
void * void *
ksalloc(int slab) ksalloc(int slab)
{ {
return kalloc_pool(slabmem[slab], slabmem[slab]->name); return kalloc_pool(slabmem[slab], slabmem[slab][mycpuid()].name);
} }
void void
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论