1. 25 Feb, 2010 1 commit
    • Thomas Gleixner's avatar
      x86/PCI: Prevent mmconfig memory corruption · bb8d4133
      Thomas Gleixner authored
      commit ff097ddd (x86/PCI: MMCONFIG: manage pci_mmcfg_region as a
      list, not a table) introduced a nasty memory corruption when
      pci_mmcfg_list is empty.
      
      pci_mmcfg_check_end_bus_number() dereferences pci_mmcfg_list.prev even
      when the list is empty. The following write hits some variable near to
      pci_mmcfg_list.
      
      Further down a similar problem exists, where cfg->list.next is
      dereferenced unconditionally and a comparison with some variable near
      to pci_mmcfg_list happens.
      
      Add a check for the last element into the for_each_entry() loop and
      remove all the other crappy logic which is just a leftover of the old
      array based code which was replaced by the list conversion.
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: stable@kernel.org
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      bb8d4133
  2. 24 Feb, 2010 1 commit
    • Rafael J. Wysocki's avatar
      ACPI: Use GPE reference counting to support shared GPEs · cbbc0de7
      Rafael J. Wysocki authored
      To fix a bug and address the reviewers' comments regarding the ACPI
      GPE refcounting patch, do the following additional changes:
      
      o Remove the second argument of acpi_ev_enable_gpe(),
        'write_to_hardware', because it is not necessary any more.
      
      o Add the "bad parameter" test against 'type' in
        acpi_enable_gpe() and acpi_disable_gpe().
      
      o Make acpi_enable_gpe() only check 'status' for runtime GPEs if
        acpi_ev_enable_gpe() was actually called.
      
      o Make acpi_disable_gpe() return 'status' returned by
        acpi_ev_disable_gpe() and fix a bug where ACPI_GPE_TYPE_WAKE
        and ACPI_GPE_TYPE_RUNTIME were exchanged by mistake.
      
      o Add comments explaining why acpi_set_gpe() is used by the ACPI EC
        driver.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      cbbc0de7
  3. 23 Feb, 2010 38 commits