]> git.karo-electronics.de Git - linux-beck.git/commit
PCI: Check IORESOURCE_UNSET before updating BAR
authorBjorn Helgaas <bhelgaas@google.com>
Wed, 26 Feb 2014 18:25:59 +0000 (11:25 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 27 Feb 2014 17:43:32 +0000 (10:43 -0700)
commitcd8a4d3657c3f2cf9ce3780707be1debb8fea6e2
tree76a9041b737f9f9620e9c4f2d1ba633fb792dcf2
parent434aafc1aefb5eb6e8c8d15284c8f929be756521
PCI: Check IORESOURCE_UNSET before updating BAR

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: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/setup-res.c