|
@@ -631,7 +631,7 @@ static void pcpu_free_chunk(struct pcpu_chunk *chunk)
|
|
if (!chunk)
|
|
if (!chunk)
|
|
return;
|
|
return;
|
|
pcpu_mem_free(chunk->map, chunk->map_alloc * sizeof(chunk->map[0]));
|
|
pcpu_mem_free(chunk->map, chunk->map_alloc * sizeof(chunk->map[0]));
|
|
- kfree(chunk);
|
|
|
|
|
|
+ pcpu_mem_free(chunk, pcpu_chunk_struct_size);
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -1380,6 +1380,9 @@ enum pcpu_fc pcpu_chosen_fc __initdata = PCPU_FC_AUTO;
|
|
|
|
|
|
static int __init percpu_alloc_setup(char *str)
|
|
static int __init percpu_alloc_setup(char *str)
|
|
{
|
|
{
|
|
|
|
+ if (!str)
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
if (0)
|
|
if (0)
|
|
/* nada */;
|
|
/* nada */;
|
|
#ifdef CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK
|
|
#ifdef CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK
|