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] ioemu: fix error recovery in pass-through.c

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] ioemu: fix error recovery in pass-through.c
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Mon, 9 Feb 2009 18:08:26 +0900
Cc: Ian.Jackson@xxxxxxxxxxxxx
Delivery-date: Mon, 09 Feb 2009 01:08:50 -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.6i
return NULL when error. fix error recovery path.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 hw/pass-through.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/hw/pass-through.c b/hw/pass-through.c
index e76a3c3..8040f29 100644
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -3123,8 +3123,10 @@ struct pt_dev * register_real_device(PCIBus *e_bus,
         free_pci_slot = __insert_to_pci_slot(r_bus, r_dev, r_func, 0, NULL);
         if ( free_pci_slot > 0 )
             e_devfn = free_pci_slot  << 3;
-        else
+        else {
             PT_LOG("Error: no free virtual PCI hot plug slot, thus no live 
migration.\n");
+            return NULL;
+        }
     }
 
     msi_translate = direct_pci_msitranslate;
-- 
1.6.0.2

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] ioemu: fix error recovery in pass-through.c, Isaku Yamahata <=