debuggers.hg
changeset 3720:6bc867ecf95b
bitkeeper revision 1.1159.223.72 (42060910CAWXk13FiquPxR_uRrD_1A)
Prevent stack overflow in PCI setup code.
Signed-off-by: keir.fraser@cl.cam.ac.uk
Prevent stack overflow in PCI setup code.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author | kaf24@viper.(none) |
---|---|
date | Sun Feb 06 12:09:52 2005 +0000 (2005-02-06) |
parents | f4aa31a8f1c3 |
children | eb32083c83ab 2e9105d1c5a6 |
files | xen/arch/x86/pci-pc.c |
line diff
1.1 --- a/xen/arch/x86/pci-pc.c Sun Feb 06 12:07:18 2005 +0000 1.2 +++ b/xen/arch/x86/pci-pc.c Sun Feb 06 12:09:52 2005 +0000 1.3 @@ -1,3 +1,4 @@ 1.4 +/* -*- Mode:C; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */ 1.5 /* 1.6 * Low-Level PCI Support for PC 1.7 * 1.8 @@ -445,8 +446,9 @@ static struct pci_ops pci_direct_conf2 = 1.9 static int __devinit pci_sanity_check(struct pci_ops *o) 1.10 { 1.11 u16 x; 1.12 - struct pci_bus bus; /* Fake bus and device */ 1.13 - struct pci_dev dev; 1.14 + /* XEN: static is important to prevent stack overflow! */ 1.15 + static struct pci_bus bus; /* Fake bus and device */ 1.16 + static struct pci_dev dev; 1.17 1.18 if (pci_probe & PCI_NO_CHECKS) 1.19 return 1; 1.20 @@ -1131,8 +1133,9 @@ static void __devinit pcibios_fixup_ghos 1.21 static void __devinit pcibios_fixup_peer_bridges(void) 1.22 { 1.23 int n; 1.24 - struct pci_bus bus; 1.25 - struct pci_dev dev; 1.26 + /* XEN: static is important to prevent stack overflow! */ 1.27 + static struct pci_bus bus; 1.28 + static struct pci_dev dev; 1.29 u16 l; 1.30 1.31 if (pcibios_last_bus <= 0 || pcibios_last_bus >= 0xff)