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

Re: [libvirt] [PATCH] Fix the ACS checking in the PCI code.



On 07/28/2010 03:07 PM, Chris Lalancette wrote:
> However, the code to find the parent of the device had a
> much too relaxed check.  It would iterate through all PCI
> devices on the system, looking for a device that had a range
> of busses that included the current device's bus.

Stupid English.  I'm more used seeing buses than busses, and was about
to call you on it, but
http://www.googlefight.com/index.php?lang=en_GB&word1=buses&word2=busses
shows both forms as roughly neck-and-neck and dictionary.com lists both
spellings as acceptable plurals.

> This patch is simple in that it looks for the PCI device
> whose secondary device *exactly* equals the bus of the
> device we are looking for.  That means that one, and only one
> bridge will be found, and it will be the correct device.

Makes sense.

> 
> Note that this also caused a fairly serious bug in the

s/caused/solved/ - the bug was caused by the condition before this
commit, but the commit message is documenting what this particular
commit does for the code base.

>  
>      /* No, it's superman! */
> -    return (dev->bus >= secondary && dev->bus <= subordinate);
> +    return (dev->bus == secondary);

Do we want a comment here in the code to summarize your commit message?
 But that's a minor nit, so:

ACK.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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