WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] This patch fixes xenlinux timer interrupt.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] This patch fixes xenlinux timer interrupt.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 10 Sep 2005 14:26:14 +0000
Delivery-date: Sat, 10 Sep 2005 14:24:51 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] This patch fixes xenlinux timer interrupt., Xen patchbot -unstable <=