]> git.baikalelectronics.ru Git - kernel.git/commit
x86: cpu_init(): fix memory leak when using CPU hotplug
authorAndreas Herrmann <andreas.herrmann3@amd.com>
Wed, 6 Aug 2008 08:29:37 +0000 (10:29 +0200)
committerIngo Molnar <mingo@elte.hu>
Sat, 6 Sep 2008 18:48:16 +0000 (20:48 +0200)
commit4850bc26e67a3f8bf4df7db0e7884b31f695117d
tree00e3401cc15bf4220b071a6391228e21e086e68f
parent4868e4fc79bff8c5e15079214c37ea77eceb299e
x86: cpu_init(): fix memory leak when using CPU hotplug

Exception stacks are allocated each time a CPU is set online.
But the allocated space is never freed. Thus with one CPU hotplug
offline/online cycle there is a memory leak of 24K (6 pages) for
a CPU.

Fix is to allocate exception stacks only once -- when the CPU is
set online for the first time.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: akpm@linux-foundation.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/common_64.c