[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] This patch fixes xenlinux timer interrupt.
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 20b6be0e1fa1feaf7942fdde976efa0bbac5c22d # Parent 8fc210e6a588b4d06a7af67a944e4def6c4b6975 This patch fixes xenlinux timer interrupt. In xenlinux timer interrupt variable cpu is sometimes uesd in a for loop, but later it is used to access per cpu data i.e. per_cpu(processed_system_time, cpu), which causes an invalid pointer. Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx> diff -r 8fc210e6a588 -r 20b6be0e1fa1 linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c Sat Sep 10 14:20:29 2005 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c Sat Sep 10 14:22:12 2005 @@ -543,7 +543,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { s64 delta, delta_cpu; - int cpu = smp_processor_id(); + int i, cpu = smp_processor_id(); struct shadow_time_info *shadow = &per_cpu(shadow_time, cpu); write_seqlock(&xtime_lock); @@ -566,9 +566,9 @@ (s64)get_nsec_offset(shadow), processed_system_time, per_cpu(processed_system_time, cpu)); - for (cpu = 0; cpu < num_online_cpus(); cpu++) - printk(" %d: %lld\n", cpu, - per_cpu(processed_system_time, cpu)); + for (i = 0; i < num_online_cpus(); i++) + printk(" %d: %lld\n", i, + per_cpu(processed_system_time, i)); } /* System-wide jiffy work. */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |