[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.4-testing] x86: Fix guest-pointer-array memmove in __pirq_guest_unbind().



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1275645121 -3600
# Node ID 2bbaf4e06c1d406c7fc5cba3cb53cfdc355aef70
# Parent  754ae5d0077dcf318f41ba22b17209f315a12cee
x86: Fix guest-pointer-array memmove in __pirq_guest_unbind().

Thanks to Alex Zeffert for finding this.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   21492:96917cf25bf3
xen-unstable date:        Fri May 28 10:54:07 2010 +0100
---
 xen/arch/x86/irq.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r 754ae5d0077d -r 2bbaf4e06c1d xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Fri Jun 04 10:20:33 2010 +0100
+++ b/xen/arch/x86/irq.c        Fri Jun 04 10:52:01 2010 +0100
@@ -736,7 +736,8 @@ static irq_guest_action_t *__pirq_guest_
     for ( i = 0; (i < action->nr_guests) && (action->guest[i] != d); i++ )
         continue;
     BUG_ON(i == action->nr_guests);
-    memmove(&action->guest[i], &action->guest[i+1], IRQ_MAX_GUESTS-i-1);
+    memmove(&action->guest[i], &action->guest[i+1],
+            (action->nr_guests-i-1) * sizeof(action->guest[0]));
     action->nr_guests--;
 
     switch ( action->ack_type )

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.