[GIT PULL] percpu fixes for v3.15-rc5

From: Tejun Heo
Date: Mon May 12 2014 - 14:32:32 EST


Hello, again.

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.

The following changes since commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5:

Linux 3.15-rc1 (2014-04-13 14:18:35 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu.git for-3.15-fixes

for you to fetch changes up to 5a838c3b60e3a36ade764cf7751b8f17d7c9c2da:

percpu: make pcpu_alloc_chunk() use pcpu_mem_free() instead of kfree() (2014-04-14 16:18:06 -0400)

Thanks.

----------------------------------------------------------------
Jianyu Zhan (1):
percpu: make pcpu_alloc_chunk() use pcpu_mem_free() instead of kfree()

mm/percpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/percpu.c b/mm/percpu.c
index 63e24fb..2ddf9a9 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;
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/