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

From: Benjamin Block

Date: Fri Sep 18 2026 - 04:27:42 EST


On Wed, Sep 16, 2026 at 05:14:11PM +0200, 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(-)
>

Looks good to me!


Reviewed-by: Benjamin Block <bblock@xxxxxxxxxxxxx>

--
Best Regards, Benjamin Block / Linux on IBM Z Kernel Development
IBM Deutschland Research & Development GmbH / https://www.ibm.com/privacy
Vors. Aufs.-R.: Wolfgang Wendt / Geschäftsführung: David Faller
Sitz der Ges.: Ehningen / Registergericht: AmtsG Stuttgart, HRB 243294