1. 03 7月, 2017 29 次提交
  2. 29 6月, 2017 6 次提交
  3. 28 4月, 2017 1 次提交
    • B
      PCI: Don't allow unbinding host controllers that aren't prepared · a5f40e80
      Brian Norris 提交于
      Many PCI host controller drivers aren't prepared to have their devices
      unbound from them forcefully (e.g., through /sys/.../<driver>/unbind), as
      they don't provide any driver .remove callback, where they'd detach the
      root bus, release resources, etc. Keeping the driver built in (i.e., not a
      loadable module) is not enough; and providing no .remove callback just
      means we don't do any teardown.
      
      To rule out the possibility of unbinding a device via sysfs, we need to set
      the ".suppress_bind_attrs" field.
      
      I found the suspect drivers via the following search:
      
        git grep -l platform_driver $(git grep -L -e '\.remove' -e suppress_bind_attrs drivers/pci/)
      
      Then I inspected them to ensure that
      (a) they set up a PCI bus in their probe() and
      (b) they don't have a remove() callback for undoing the setup
      Suggested-by: NBjorn Helgaas <helgaas@kernel.org>
      Signed-off-by: NBrian Norris <briannorris@chromium.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      a5f40e80
  4. 25 4月, 2017 4 次提交