Skip to content
  • Bjorn Helgaas's avatar
    cd8a4d36
    PCI: Check IORESOURCE_UNSET before updating BAR · cd8a4d36
    Bjorn Helgaas authored
    
    
    Check to make sure we don't update a BAR with an address we haven't
    assigned.
    
    If we haven't assigned an address to a resource, we shouldn't write it to a
    BAR.  This isn't a problem for the usual path via pci_assign_resource(),
    which clears IORESOURCE_UNSET before calling pci_update_resource(), but
    paths like pci_restore_bars() can call this for resources we haven't
    assigned.
    
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    cd8a4d36
    PCI: Check IORESOURCE_UNSET before updating BAR
    Bjorn Helgaas authored
    
    
    Check to make sure we don't update a BAR with an address we haven't
    assigned.
    
    If we haven't assigned an address to a resource, we shouldn't write it to a
    BAR.  This isn't a problem for the usual path via pci_assign_resource(),
    which clears IORESOURCE_UNSET before calling pci_update_resource(), but
    paths like pci_restore_bars() can call this for resources we haven't
    assigned.
    
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Loading