Re: [PATCH v3 2/4] s390/pci: Fix missing device lock in zpci_report_status()

From: Farhan Ali

Date: Thu Sep 17 2026 - 15:03:49 EST



On 9/16/2026 8:14 AM, Niklas Schnelle wrote:
When pdev is non-NULL, zpci_report_status() accesses the device's driver.
To get a consistent state matching the recovery, the device lock needs to
be held. Do so by expanding the existing device lock critical section.

The lock only needs to be held when the pdev is non-NULL, so extract
the pdev-specific reporting into a helper function which also adds a
lockdep assertion to detect calls without the device lock held.

Cc:stable@xxxxxxxxxxxxxxx
Fixes: 4ec6054e7321 ("s390/pci: Report PCI error recovery results via SCLP")
Signed-off-by: Niklas Schnelle<schnelle@xxxxxxxxxxxxx>
---
arch/s390/pci/pci_event.c | 2 +-
arch/s390/pci/pci_report.c | 21 +++++++++++++++------
2 files changed, 16 insertions(+), 7 deletions(-)

Reviewed-by: Farhan Ali <alifm@xxxxxxxxxxxxx>