aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@openvz.org>2009-11-08 10:54:31 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-08 11:06:23 -0500
commit4343fe1024e09e17667f95620ed3e69a7a5f4389 (patch)
tree1de7224068779bafd828ad2291cad1406b6a10b4 /arch/x86/kernel/apic
parent46dc281b1bb02527195fe2ad50a3af6d7f7f7325 (diff)
x86, ioapic: Use snrpintf while set names for IO-APIC resourses
We should be ready that one day MAX_IO_APICS may raise its number. To prevent memory overwrite we're to use safe snprintf while set IO-APIC resourse name. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Yinghai Lu <yinghai@kernel.org> LKML-Reference: <20091108155431.GC25940@lenovo> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/apic')
-rw-r--r--arch/x86/kernel/apic/io_apic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 9ee1c1628c17..24d1458a1822 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -4066,7 +4066,7 @@ static struct resource * __init ioapic_setup_resources(int nr_ioapics)
4066 for (i = 0; i < nr_ioapics; i++) { 4066 for (i = 0; i < nr_ioapics; i++) {
4067 res[i].name = mem; 4067 res[i].name = mem;
4068 res[i].flags = IORESOURCE_MEM | IORESOURCE_BUSY; 4068 res[i].flags = IORESOURCE_MEM | IORESOURCE_BUSY;
4069 sprintf(mem, "IOAPIC %u", i); 4069 snprintf(mem, IOAPIC_RESOURCE_NAME_SIZE, "IOAPIC %u", i);
4070 mem += IOAPIC_RESOURCE_NAME_SIZE; 4070 mem += IOAPIC_RESOURCE_NAME_SIZE;
4071 } 4071 }
4072 4072