Re: [PATCH] s390/pci: Fix s390_pci_mmio_write syscall error return without MIO
From: Vasily Gorbik
Date: Thu Jul 23 2026 - 05:20:45 EST
On Wed, Jul 22, 2026 at 03:08:34PM +0200, Niklas Schnelle wrote:
> On a machine without PCI memory-I/O (MIO) support or when running with
> pci=nomio the s390 specific PCI MMIO write syscall checks if the MMIO
> cookie is above ZPCI_IOMAP_ADDR_BASE as a sanity check before even
> trying to perform the MMIO. If this check fails the return value was
> left unchanged and thus 0 from prior operations falsely indicating
> success. This could potentially confuse user-space into falsely
> believing the MMIO, on a mapping not valid for MMIO was successful.
>
> Fix this by setting the return value to -EFAULT prior to the check
> following the same pattern as elsewhere in the same function.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Reviewed-by: Julian Ruess <julianr@xxxxxxxxxxxxx>
> Reviewed-by: Farhan Ali <alifm@xxxxxxxxxxxxx>
> Fixes: a67a88b0b8de ("s390/pci: remove races against pte updates")
> Signed-off-by: Niklas Schnelle <schnelle@xxxxxxxxxxxxx>
> ---
> arch/s390/pci/pci_mmio.c | 1 +
> 1 file changed, 1 insertion(+)
Applied, thank you!