Re: [Qemu-devel] [PATCH 2/2] pci init: Check if devfn exceeding the max devices number supported on bus

2010-08-23 Thread Isaku Yamahata
On Tue, Aug 24, 2010 at 09:43:25AM +0800, Ken CC wrote: > On Mon, Aug 23, 2010 at 06:56:56PM +0900, Isaku Yamahata wrote: > > > > How did you trigger the bug? > > I suppose parse_pci_devfn() in qdev-properties should check the error. > > Although I'm not objecting this patch itself, it's caller's

Re: [Qemu-devel] [PATCH 2/2] pci init: Check if devfn exceeding the max devices number supported on bus

2010-08-23 Thread Ken CC
On Mon, Aug 23, 2010 at 06:56:56PM +0900, Isaku Yamahata wrote: > > How did you trigger the bug? > I suppose parse_pci_devfn() in qdev-properties should check the error. > Although I'm not objecting this patch itself, it's caller's bug. > Just assert(devfn < PCIBUS_MAX_DEVICES)? > assign pci add

Re: [Qemu-devel] [PATCH 2/2] pci init: Check if devfn exceeding the max devices number supported on bus

2010-08-23 Thread Isaku Yamahata
How did you trigger the bug? I suppose parse_pci_devfn() in qdev-properties should check the error. Although I'm not objecting this patch itself, it's caller's bug. Just assert(devfn < PCIBUS_MAX_DEVICES)? On Mon, Aug 23, 2010 at 01:56:31PM +0800, Ken CC wrote: > > Check before trying subindexin

[Qemu-devel] [PATCH 2/2] pci init: Check if devfn exceeding the max devices number supported on bus

2010-08-22 Thread Ken CC
Check before trying subindexing. Signed-off-by: Ken CC --- hw/pci.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index a09fbac..f6f00c6 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -675,6 +675,10 @@ static PCIDevice *do_pci_register_device(PCIDevice

[Qemu-devel] [PATCH 2/2] pci init: Check if devfn exceeding the max devices number supported on bus

2010-08-12 Thread Ken CC
Check before trying subindexing. Signed-off-by: Ken CC --- hw/pci.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index a09fbac..f6f00c6 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -675,6 +675,10 @@ static PCIDevice *do_pci_register_device(PCIDevice