We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fcaa7c commit 2839b09Copy full SHA for 2839b09
mm/kfence/core.c
@@ -621,6 +621,16 @@ static bool __init kfence_init_pool_early(void)
621
* fails for the first page, and therefore expect addr==__kfence_pool in
622
* most failure cases.
623
*/
624
+ for (char *p = (char *)addr; p < __kfence_pool + KFENCE_POOL_SIZE; p += PAGE_SIZE) {
625
+ struct slab *slab = virt_to_slab(p);
626
+
627
+ if (!slab)
628
+ continue;
629
+#ifdef CONFIG_MEMCG
630
+ slab->memcg_data = 0;
631
+#endif
632
+ __folio_clear_slab(slab_folio(slab));
633
+ }
634
memblock_free_late(__pa(addr), KFENCE_POOL_SIZE - (addr - (unsigned long)__kfence_pool));
635
__kfence_pool = NULL;
636
return false;
0 commit comments