[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] pci-devfn: check that device/slot number is wit

From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] pci-devfn: check that device/slot number is within range
Date: Thu, 22 Sep 2011 10:08:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Donald Dutile <address@hidden> writes:

> Need to check that guest slot/device number is not > 31 or walk off
> the devfn table when checking if a devfn is available or not in a guest.

Here in do_pci_register_device():

    } else if (bus->devices[devfn]) {
        error_report("PCI: devfn %d not available for %s, in use by %s",
                     devfn, name, bus->devices[devfn]->name);
        return NULL;

> before this fix, passing in an addr=abc  or addr=34,
> can crash qemu, sometimes fail gracefully if data past end
> of devfn table fails the availability test.
> with this fix, get clean error:
> Property 'pci-assign.addr' doesn't take value '34'
> also tested when no addr= param passed for guest (pcicfg) address,
> and that worked as well.
> Signed-off-by: Don Dutile <address@hidden>

Reviewed-by: Markus Armbruster <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]