[PATCH v2 0/6] PCI: Fix procfs PCI config access issues

Ziming Du <[email protected]>
Newsgroups org.kernel.vger.linux-pci,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hi,

As suggested by Bjorn and Krzysztof, this series aligns the procfs PCI
configuration access implementation with its sysfs counterpart and fixes
issues found while reviewing the two paths.

The first four patches fix the offset truncation, inode size update race,
missing driver-exclusive resource warning, and unnecessary runtime PM
operations at the end of sysfs configuration space. The final two
patches align the procfs read and write implementations with their sysfs
counterparts.

Changes from v1:
  - Merge the read and write offset fixes and move them before the
    refactoring to avoid an intermediate signed/unsigned regression.
  - Serialize i_size_write() with the inode lock.
  - Add the driver-exclusive resource warning to procfs writes.
  - Avoid unnecessary runtime PM get/put when sysfs config access starts at EOF.

Link: https://lore.kernel.org/all/20260303193253.GA3817951@bhelgaas/
Link: https://lore.kernel.org/linux-pci/[email protected]/
Link: https://sashiko.dev/#/patchset/20260414024544.2975605-1-duziming2%40huawei.com


Ziming Du (6):
  PCI: Prevent overflow in proc_bus_pci_{read,write}()
  PCI/proc: Serialize config inode size updates
  PCI/proc: Warn on writes to driver-exclusive config regions
  PCI/sysfs: Avoid runtime PM at config-space EOF
  PCI: Align proc_bus_pci_write() with pci_write_config()
  PCI: Align proc_bus_pci_read() with pci_read_config()

 drivers/pci/pci-sysfs.c |   4 +-
 drivers/pci/proc.c      | 124 +++++++++++++++++++++-------------------
 2 files changed, 68 insertions(+), 60 deletions(-)

-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.