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

[Xen-changelog] [xen stable-4.12] ioreq: fix hvm_all_ioreq_servers_add_vcpu fail path cleanup



commit 599d6d23cbb790a788f7a49ab4f11f1a3b5b429e
Author:     Roger Pau Monné <roger.pau@xxxxxxxxxx>
AuthorDate: Mon Sep 23 14:26:14 2019 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Sep 23 14:26:14 2019 +0200

    ioreq: fix hvm_all_ioreq_servers_add_vcpu fail path cleanup
    
    The loop in FOR_EACH_IOREQ_SERVER is backwards hence the cleanup on
    failure needs to be done forwards.
    
    Fixes: 97a5a3e30161 ('x86/hvm/ioreq: maintain an array of ioreq servers 
rather than a list')
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
    master commit: 215f2576b0ac1bc18f3ff74e34f0d8379bda9040
    master date: 2019-09-10 16:32:47 +0200
---
 xen/arch/x86/hvm/ioreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/ioreq.c b/xen/arch/x86/hvm/ioreq.c
index 7a80cfb28b..3b9d96bbc0 100644
--- a/xen/arch/x86/hvm/ioreq.c
+++ b/xen/arch/x86/hvm/ioreq.c
@@ -1202,7 +1202,7 @@ int hvm_all_ioreq_servers_add_vcpu(struct domain *d, 
struct vcpu *v)
     return 0;
 
  fail:
-    while ( id-- != 0 )
+    while ( ++id != MAX_NR_IOREQ_SERVERS )
     {
         s = GET_IOREQ_SERVER(d, id);
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.12

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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