diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-05-13 11:25:56 +0900 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-05-13 11:25:56 +0900 |
commit | 68cb363a4ddc335fddf6e2ccb03e4a907ba7afbf (patch) | |
tree | 636ca2cf21ded393eca9b78d33dcb8e7eefde533 /mm | |
parent | efb2b1d5fdf4be71d63d29b881bf3d6f93f53694 (diff) | |
parent | 5a838c3b60e3a36ade764cf7751b8f17d7c9c2da (diff) |
Merge branch 'for-3.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
Pull a percpu fix from Tejun Heo:
"Fix for a percpu allocator bug where it could try to kfree() a memory
region allocated using vmalloc(). The bug has been there for years
now and is unlikely to have ever triggered given the size of struct
pcpu_chunk. It's still theoretically possible and the fix is simple
and safe enough, so the patch is marked with -stable"
* 'for-3.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
percpu: make pcpu_alloc_chunk() use pcpu_mem_free() instead of kfree()
Diffstat (limited to 'mm')
-rw-r--r-- | mm/percpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/percpu.c b/mm/percpu.c index 63e24fb4387..2ddf9a990db 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -610,7 +610,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; } |