No description
Find a file
Lukas Wunner 19e14e8816 PCI/ASPM: Fix link_state teardown on device removal
commit aeae4f3e5c upstream.

Upon removal of the last device on a bus, the link_state of the bridge
leading to that bus is sought to be torn down by having pci_stop_dev()
call pcie_aspm_exit_link_state().

When ASPM was originally introduced by commit 7d715a6c1a ("PCI: add
PCI Express ASPM support"), it determined whether the device being
removed is the last one by calling list_empty() on the bridge's
subordinate devices list.  That didn't work because the device is only
removed from the list slightly later in pci_destroy_dev().

Commit 3419c75e15 ("PCI: properly clean up ASPM link state on device
remove") attempted to fix it by calling list_is_last(), but that's not
correct either because it checks whether the device is at the *end* of
the list, not whether it's the last one *left* in the list.  If the user
removes the device which happens to be at the end of the list via sysfs
but other devices are preceding the device in the list, the link_state
is torn down prematurely.

The real fix is to move the invocation of pcie_aspm_exit_link_state() to
pci_destroy_dev() and reinstate the call to list_empty().  Remove a
duplicate check for dev->bus->self because pcie_aspm_exit_link_state()
already contains an identical check.

Fixes: 7d715a6c1a ("PCI: add PCI Express ASPM support")
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Shaohua Li <shaohua.li@intel.com>
Cc: stable@vger.kernel.org # v2.6.26
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-13 11:15:07 -08:00
arch ARM: dts: dra7: Fix up unaligned access setting for PCIe EP 2018-11-13 11:15:07 -08:00
block
certs
crypto
Documentation
drivers PCI/ASPM: Fix link_state teardown on device removal 2018-11-13 11:15:07 -08:00
firmware
fs ext4: fix use-after-free race in ext4_remount()'s error path 2018-11-13 11:15:06 -08:00
include
init
ipc
kernel signal: Always deliver the kernel's SIGKILL and SIGSTOP to a pid namespace init 2018-11-13 11:15:00 -08:00
lib
mm
net net/ipv4: defensive cipso option parsing 2018-11-13 11:15:04 -08:00
samples
scripts
security
sound ASoC: intel: skylake: Add missing break in skl_tplg_get_token() 2018-11-13 11:15:05 -08:00
tools cpupower: Fix AMD Family 0x17 msr_pstate size 2018-11-13 11:15:01 -08:00
usr
virt
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README

Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.