hugetlb: fix copy_hugetlb_page_range() to handle migration/hwpoisoned entry
[platform/adaptation/renesas_rcar/renesas_kernel.git] / mm / percpu.c
index 036cfe0..a2a54a8 100644 (file)
@@ -612,7 +612,7 @@ static struct pcpu_chunk *pcpu_alloc_chunk(void)
        chunk->map = pcpu_mem_zalloc(PCPU_DFL_MAP_ALLOC *
                                                sizeof(chunk->map[0]));
        if (!chunk->map) {
-               kfree(chunk);
+               pcpu_mem_free(chunk, pcpu_chunk_struct_size);
                return NULL;
        }