diff options
-rw-r--r-- | arch/x86/xen/time.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c index 5190687ca569..011f1bf85765 100644 --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel_stat.h> | 14 | #include <linux/kernel_stat.h> |
15 | #include <linux/math64.h> | 15 | #include <linux/math64.h> |
16 | #include <linux/gfp.h> | 16 | #include <linux/gfp.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include <asm/pvclock.h> | 19 | #include <asm/pvclock.h> |
19 | #include <asm/xen/hypervisor.h> | 20 | #include <asm/xen/hypervisor.h> |
@@ -402,7 +403,7 @@ static irqreturn_t xen_timer_interrupt(int irq, void *dev_id) | |||
402 | 403 | ||
403 | void xen_setup_timer(int cpu) | 404 | void xen_setup_timer(int cpu) |
404 | { | 405 | { |
405 | const char *name; | 406 | char *name; |
406 | struct clock_event_device *evt; | 407 | struct clock_event_device *evt; |
407 | int irq; | 408 | int irq; |
408 | 409 | ||
@@ -425,6 +426,7 @@ void xen_setup_timer(int cpu) | |||
425 | 426 | ||
426 | evt->cpumask = cpumask_of(cpu); | 427 | evt->cpumask = cpumask_of(cpu); |
427 | evt->irq = irq; | 428 | evt->irq = irq; |
429 | per_cpu(xen_clock_events, cpu).name = name; | ||
428 | } | 430 | } |
429 | 431 | ||
430 | void xen_teardown_timer(int cpu) | 432 | void xen_teardown_timer(int cpu) |
@@ -434,6 +436,8 @@ void xen_teardown_timer(int cpu) | |||
434 | evt = &per_cpu(xen_clock_events, cpu).evt; | 436 | evt = &per_cpu(xen_clock_events, cpu).evt; |
435 | unbind_from_irqhandler(evt->irq, NULL); | 437 | unbind_from_irqhandler(evt->irq, NULL); |
436 | evt->irq = -1; | 438 | evt->irq = -1; |
439 | kfree(per_cpu(xen_clock_events, cpu).name); | ||
440 | per_cpu(xen_clock_events, cpu).name = NULL; | ||
437 | } | 441 | } |
438 | 442 | ||
439 | void xen_setup_cpu_clockevents(void) | 443 | void xen_setup_cpu_clockevents(void) |