linux/arch/s390/pci
Niklas Schnelle b7ab86bdc6 s390/pci: Fix s390_pci_mmio_write syscall error return without MIO
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@vger.kernel.org
Reviewed-by: Julian Ruess <julianr@linux.ibm.com>
Reviewed-by: Farhan Ali <alifm@linux.ibm.com>
Fixes: a67a88b0b8 ("s390/pci: remove races against pte updates")
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
History 2026-07-31 13:31:19 +02:00
..
Makefile s390/pci: Support mmap() of PCI resources except for ISM devices 2025-03-21 14:54:16 -05:00
pci.c resource: Pass full extent of empty space to resource_alignf callback 2026-03-27 10:18:39 -05:00
pci_bus.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pci_bus.h s390/pci: Fix cyclic dead-lock in zpci_zdev_put() and zpci_scan_devices() 2025-12-14 11:03:58 +01:00
pci_clp.c s390: Remove KMSG_COMPONENT macro 2025-11-24 11:45:21 +01:00
pci_debug.c s390: Remove KMSG_COMPONENT macro 2025-11-24 11:45:21 +01:00
pci_event.c s390 updates for 6.19 merge window 2025-12-02 16:37:00 -08:00
pci_fixup.c s390/pci: Support mmap() of PCI resources except for ISM devices 2025-03-21 14:54:16 -05:00
pci_insn.c s390: Remove superfluous newlines from inline assemblies 2025-09-29 13:52:08 +02:00
pci_iov.c s390: Remove KMSG_COMPONENT macro 2025-11-24 11:45:21 +01:00
pci_iov.h s390/pci: Fix handling of isolated VFs 2025-02-11 19:35:08 +01:00
pci_irq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pci_kvm_hook.c s390: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00
pci_mmio.c s390/pci: Fix s390_pci_mmio_write syscall error return without MIO 2026-07-31 13:31:19 +02:00
pci_report.c s390: Remove KMSG_COMPONENT macro 2025-11-24 11:45:21 +01:00
pci_report.h s390/pci: Report PCI error recovery results via SCLP 2024-12-16 16:14:26 +01:00
pci_sysfs.c PCI: s390: Expose the UID as an arch specific PCI slot attribute 2026-04-11 11:18:15 +02:00