Re: [PATCH v10 6/9] s390/pci: Store PCI error information for passthrough devices

From: Farhan Ali

Date: Wed Mar 11 2026 - 15:51:21 EST



On 3/11/2026 12:30 PM, Markus Elfring wrote:

+++ b/arch/s390/pci/pci_event.c

+void zpci_cleanup_pending_errors(struct zpci_dev *zdev)
+{

+ mutex_lock(&zdev->pending_errs_lock);
+ pdev = pci_get_slot(zdev->zbus->bus, zdev->devfn);

+ pci_dev_put(pdev);
+ mutex_unlock(&zdev->pending_errs_lock);
+}


Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&zdev->pending_errs_lock);”?
https://elixir.bootlin.com/linux/v7.0-rc3/source/include/linux/mutex.h#L253

Regards,
Markus

Hey Markus,

I wasn't aware of this pattern. I think the guard() statement can be added here, will update in the next revision.

Thanks

Farhan