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

Free to our CPU's slab, not to CPU 0's slab

Previously, ksfree passed the whole CPU array for a slab to kfree_pool, which expected a pointer to the specific kmem to free to. Since the array decayed to a pointer, this compiled and worked, but would always free to CPU 0's slab.
上级 8ff159ab
......@@ -321,5 +321,5 @@ kfree(void *v)
void
ksfree(int slab, void *v)
{
kfree_pool(slabmem[slab], (char*) v);
kfree_pool(&slabmem[slab][mycpuid()], (char*) v);
}
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论