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] sched/arinc653: fix another unsigned < 0 comparison

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] sched/arinc653: fix another unsigned < 0 comparison
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Wed, 8 Dec 2010 11:59:03 +0000
Cc: George Dunlap <george.dunlap@xxxxxxxxxxxxx>, Josh Holtrop <Josh.Holtrop@xxxxxxxxxxxxxxx>
Delivery-date: Wed, 08 Dec 2010 04:03:53 -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
User-agent: Mutt/1.5.20 (2009-06-14)
sched/arinc653: fix another unsigned < 0 comparison
replacing it with a test of the appopriate unsigned max.

Signed-off-by:Tim Deegan <Tim.Deegan@xxxxxxxxxx>

diff -r 89116f28083f -r a107be26c1fc xen/common/sched_arinc653.c
--- a/xen/common/sched_arinc653.c       Wed Dec 08 10:46:31 2010 +0000
+++ b/xen/common/sched_arinc653.c       Wed Dec 08 11:55:40 2010 +0000
@@ -241,7 +241,7 @@ arinc653_sched_set(
             found_dom0 = 1;
 
         /* Check for a valid VCPU ID and run time. */
-        if ( (schedule->sched_entries[i].vcpu_id < 0)
+        if ( (schedule->sched_entries[i].vcpu_id >= MAX_VIRT_CPUS)
              || (schedule->sched_entries[i].runtime <= 0) )
             goto fail;
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] sched/arinc653: fix another unsigned < 0 comparison, Tim Deegan <=