1. 15 9月, 2009 4 次提交
  2. 14 9月, 2009 2 次提交
  3. 10 9月, 2009 1 次提交
  4. 18 6月, 2009 2 次提交
  5. 27 5月, 2009 1 次提交
    • A
      PCI Hotplug: acpiphp: don't store a pci_dev in acpiphp_func · 9d911d79
      Alex Chiang 提交于
      An oops can occur if a user attempts to use both PCI logical
      hotplug and the ACPI physical hotplug driver (acpiphp) in this
      sequence, where $slot/address == $device.
      
      In other words, if acpiphp has claimed a PCI device, and that
      device is logically removed, then acpiphp may oops when it
      attempts to access it again.
      
      	# echo 1 > /sys/bus/pci/devices/$device/remove
      	# echo 0 > /sys/bus/pci/slots/$slot/power
      
      Unable to handle kernel NULL pointer dereference (address 0000000000000000)
      Call Trace:
       [<a000000100016390>] show_stack+0x50/0xa0
       [<a000000100016c60>] show_regs+0x820/0x860
       [<a00000010003b390>] die+0x190/0x2a0
       [<a000000100066a40>] ia64_do_page_fault+0x8e0/0xa40
       [<a00000010000c7a0>] ia64_native_leave_kernel+0x0/0x270
       [<a0000001003b2660>] pci_remove_bus_device+0x120/0x260
       [<a0000002060549f0>] acpiphp_disable_slot+0x410/0x540 [acpiphp]
       [<a0000002060505c0>] disable_slot+0xc0/0x120 [acpiphp]
       [<a0000002040d21c0>] power_write_file+0x1e0/0x2a0 [pci_hotplug]
       [<a0000001003bb820>] pci_slot_attr_store+0x60/0xa0
       [<a000000100240f70>] sysfs_write_file+0x230/0x2c0
       [<a000000100195750>] vfs_write+0x190/0x2e0
       [<a0000001001961a0>] sys_write+0x80/0x100
       [<a00000010000c600>] ia64_ret_from_syscall+0x0/0x20
       [<a000000000010720>] __kernel_syscall_via_break+0x0/0x20
      
      The root cause of this oops is that the logical remove ("echo 1 >
      /sys/bus/pci/devices/$device/remove") destroyed the pci_dev. The
      pci_dev struct itself wasn't deallocated because acpiphp kept a
      reference, but some of its fields became invalid.
      
      acpiphp doesn't have any real reason to keep a pointer to a
      pci_dev around. It can always derive it using pci_get_slot().
      
      If a logical remove destroys the pci_dev, acpiphp won't find it
      and is thus prevented from causing mischief.
      Reviewed-by: NMatthew Wilcox <willy@linux.intel.com>
      Reviewed-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Tested-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Reported-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Acked-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      9d911d79
  6. 07 4月, 2009 1 次提交
  7. 17 1月, 2009 1 次提交
  8. 08 1月, 2009 3 次提交
  9. 17 12月, 2008 1 次提交
  10. 11 10月, 2008 1 次提交
  11. 24 9月, 2008 1 次提交
  12. 03 7月, 2008 1 次提交
    • A
      PCI: acpiphp: cleanup notify handler on all root bridges · a13307ce
      Alex Chiang 提交于
      During the development of the physical PCI slot patch series, Gary Hade
      kept on reporting strange oopses due to interactions between pci_slot
      and acpiphp.
      
      	http://lkml.org/lkml/2007/11/28/319
      
      find_root_bridges() unconditionally installs
      handle_hotplug_event_bridge() as an ACPI_SYSTEM_NOTIFY handler for all
      root bridges.
      
      However, during module cleanup, remove_bridge() will only remove the
      notify handler iff the root bridge had a hot-pluggable slot directly
      underneath. That is:
      
      	root bridge -> hotplug slot
      
      But, if the topology looks like either of the following:
      
      	root bridge -> non-hotplug slot
      	root bridge -> p2p bridge -> hotplug slot
      
      Then we currently do not remove the notify handler from that root
      bridge.
      
      This can cause a kernel oops if we modprobe acpiphp later and it gets
      loaded somewhere else in memory. If the root bridge then receives a
      hotplug event, it will then attempt to call a stale, non-existent notify
      handler and we blow up.
      
      Much thanks goes to Gary Hade for his persistent debugging efforts.
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NGary Hade <garyhade@us.ibm.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      a13307ce
  13. 11 6月, 2008 1 次提交
    • A
      PCI: introduce pci_slot · f46753c5
      Alex Chiang 提交于
      Currently, /sys/bus/pci/slots/ only exposes hotplug attributes when a
      hotplug driver is loaded, but PCI slots have attributes such as address,
      speed, width, etc.  that are not related to hotplug at all.
      
      Introduce pci_slot as the primary data structure and kobject model.
      Hotplug attributes described in hotplug_slot become a secondary
      structure associated with the pci_slot.
      
      This patch only creates the infrastructure that allows the separation of
      PCI slot attributes and hotplug attributes.  In this patch, the PCI
      hotplug core remains the only user of this infrastructure, and thus,
      /sys/bus/pci/slots/ will still only become populated when a hotplug
      driver is loaded.
      
      A later patch in this series will add a second user of this new
      infrastructure and demonstrate splitting the task of exposing pci_slot
      attributes from hotplug_slot attributes.
      
        - Make pci_slot the primary sysfs entity. hotplug_slot becomes a
          subsidiary structure.
          o pci_create_slot() creates and registers a slot with the PCI core
          o pci_slot_add_hotplug() gives it hotplug capability
      
        - Change the prototype of pci_hp_register() to take the bus and
          slot number (on parent bus) as parameters.
      
        - Remove all the ->get_address methods since this functionality is
          now handled by pci_slot directly.
      
      [achiang@hp.com: rpaphp-correctly-pci_hp_register-for-empty-pci-slots]
      Tested-by: NBadari Pulavarty <pbadari@us.ibm.com>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: make headers_check happy]
      [akpm@linux-foundation.org: nuther build fix]
      [akpm@linux-foundation.org: fix typo in #include]
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Cc: Greg KH <greg@kroah.com>
      Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
      Cc: Len Brown <lenb@kernel.org>
      Acked-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      f46753c5
  14. 21 4月, 2008 1 次提交
  15. 05 3月, 2008 1 次提交
    • S
      PCI: fix section mismatch warning in pci_scan_child_bus · 0ab2b57f
      Sam Ravnborg 提交于
      Fix following warning:
      WARNING: vmlinux.o(.text+0x47bdb1): Section mismatch in reference from the function pci_scan_child_bus() to the function .devinit.text:pcibios_fixup_bus()
      
      We had plenty of functions that could be annotated __devinit but due to
      the former restriction that exported symbols could not be annotated
      they were not so.  So annotate these function and fix the references
      from the pci/hotplug/* code to silence the resuting warnings.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0ab2b57f
  16. 02 2月, 2008 2 次提交
  17. 29 11月, 2007 1 次提交
    • R
      pci hotplug: kernel-doc fixes · 26e6c66e
      Randy Dunlap 提交于
      acpiphp.h: not using kernel-doc, so change /** to /*
      acpiphp_core.c: lots of kernel-doc cleanups
      acpiphp_glue.c: lots of kernel-doc cleanups
      acpiphp_ibm.c: lots of kernel-doc cleanups
      cpqphp_core.c: lots of kernel-doc cleanups
      cpqphp_ctrl.c: lots of kernel-doc cleanups
      fakephp.c:  correct kernel-doc notation
      pciehp_ctrl.c: correct kernel-doc notation
      rpadlpar_core.c: correct function names & kernel-doc notation
      rpaphp_core.c: correct kernel-doc notation
      shpchp_ctrl.c: correct kernel-doc notation
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Kristen Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      26e6c66e
  18. 12 7月, 2007 3 次提交
  19. 09 5月, 2007 1 次提交
  20. 03 2月, 2007 1 次提交
  21. 21 12月, 2006 1 次提交
  22. 02 12月, 2006 1 次提交
  23. 28 10月, 2006 1 次提交
  24. 19 10月, 2006 1 次提交
  25. 27 9月, 2006 6 次提交