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-devel

[Xen-devel] [PATCH] Fix one bug in pcpu.c

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] [PATCH] Fix one bug in pcpu.c
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Mon, 16 Nov 2009 18:50:19 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 16 Nov 2009 02:51:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcpmqpXXLq4zdZpjQbmbn+P1WVUfXA==
Thread-topic: [PATCH] Fix one bug in pcpu.c
The following patch fix one bug in pcpu.c.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@xxxxxxxxx>

diff --git a/drivers/xen/pcpu.c b/drivers/xen/pcpu.c
index ec763de..444a80c 100644
--- a/drivers/xen/pcpu.c
+++ b/drivers/xen/pcpu.c
@@ -201,9 +201,9 @@ static struct pcpu *get_pcpu(int xen_id)

        list_for_each_entry(pcpu, &xen_pcpus.list, pcpu_list) {
                if (pcpu->xen_id == xen_id)
-                       break;
+                       return pcpu;
        }
-       return (pcpu->xen_id == xen_id) ? pcpu : NULL;
+       return NULL;
 }

 static struct pcpu *init_pcpu(struct xenpf_pcpuinfo *info)

Attachment: pcpu_fix.patch
Description: pcpu_fix.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Fix one bug in pcpu.c, Jiang, Yunhong <=