v2
2026-10-30
KFENCE池分配失败修复 · v2
修复KFENCE池初始化失败清理和释放前清指针,RISC-V预留失败仍启动。
原始补丁链接
子 Patch(3)
1/3
kfence: fix pool cleanup on metadata allocation failure
From: Jackie Liu liuyun01@kylinos.cn kfence_init_late() saves __kfence_pool in addr before allocating the pool, so addr is still NULL if metadata allocation fails. The error path then tries to free
2/3
kfence: clear the pool pointer before freeing pages
From: Jackie Liu liuyun01@kylinos.cn Late initialization frees a failed pool before clearing __kfence_pool. Slab allocations can reuse those pages in between and be mistaken for KFENCE objects by i
3/3
riscv: keep booting if KFENCE pool reservation fails
From: Jackie Liu liuyun01@kylinos.cn A failed KFENCE pool reservation hits BUG_ON() and stops boot. Continue building the linear map and disable KFENCE if the reservation fails. Reject later pool