[PATCH v3 0/4] s390/pci: Fix some zpci_report_status() issues

Niklas Schnelle posted 4 patches 1 week, 1 day ago
arch/s390/pci/pci_event.c  |  7 +++++--
arch/s390/pci/pci_report.c | 32 ++++++++++++++++++++------------
arch/s390/pci/pci_report.h |  4 +++-
3 files changed, 28 insertions(+), 15 deletions(-)
[PATCH v3 0/4] s390/pci: Fix some zpci_report_status() issues
Posted by Niklas Schnelle 1 week, 1 day ago
Hi All,

This series fixes four issues found in zpci_report_status().

* A missing pci_dev_put() (patch 1)
* Dropping the device lock too early (patch 2)
* Missing an error report when there is no associated pdev (patch 3)
* An inconsistent error report when skipping recovery on permanent
  failure (patch 4)

Thanks,
Niklas

Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
Changes in v3:
- Change in approach, pass the pdev as a parameter
- Add a device lock assertion and extract a helper function for pdev
  specific status
- Also report the status if no pdev is associated
- Fix an inconsistent report when recovery is skipped due to permanent
  failure
- Link to v2: https://lore.kernel.org/r/20260819-fix_zpci_report_status_pdev_leak-v2-0-da0c4aa7c0ca@linux.ibm.com

Changes in v2:
- Added a second fix to address Sashiko's finding of having
  to hold the device lock during the call to zpci_report_status()
- Add R-bs from Matthew and Farhan
- Link to v1: https://lore.kernel.org/r/20260818-fix_zpci_report_status_pdev_leak-v1-1-576520f4d068@linux.ibm.com

---
Niklas Schnelle (4):
      s390/pci: Fix leak of struct pci_dev reference in zpci_report_status()
      s390/pci: Fix missing device lock in zpci_report_status()
      s390/pci: Report SCLP status on error events when no pdev is associated
      s390/pci: Don't report recovery success on skipped recovery

 arch/s390/pci/pci_event.c  |  7 +++++--
 arch/s390/pci/pci_report.c | 32 ++++++++++++++++++++------------
 arch/s390/pci/pci_report.h |  4 +++-
 3 files changed, 28 insertions(+), 15 deletions(-)
---
base-commit: fd73f4a6659897191fa0d40695fe370925dd3780
change-id: 20260817-fix_zpci_report_status_pdev_leak-1b101c1fe021

Best regards,
-- 
Niklas Schnelle
Re: [PATCH v3 0/4] s390/pci: Fix some zpci_report_status() issues
Posted by Heiko Carstens 3 days, 15 hours ago
On Wed, Sep 16, 2026 at 05:14:09PM +0200, Niklas Schnelle wrote:
> Hi All,
> 
> This series fixes four issues found in zpci_report_status().
...
> Niklas Schnelle (4):
>       s390/pci: Fix leak of struct pci_dev reference in zpci_report_status()
>       s390/pci: Fix missing device lock in zpci_report_status()
>       s390/pci: Report SCLP status on error events when no pdev is associated
>       s390/pci: Don't report recovery success on skipped recovery
> 
>  arch/s390/pci/pci_event.c  |  7 +++++--
>  arch/s390/pci/pci_report.c | 32 ++++++++++++++++++++------------
>  arch/s390/pci/pci_report.h |  4 +++-
>  3 files changed, 28 insertions(+), 15 deletions(-)

Series applied, thanks!