From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> This reverts commit 03844b1908114680ca35fa0a0aba3d906a6d78af. It had been committed multiple times to the tree, and isn't needed again. Link: https://lore.kernel.org/r/a082db2605514513a0a8568382d5bd2b6f1877a0.camel@xxxxxxxxxxxxxxxxxxxxx Reported-by: Stefan Nürnberger <stefan.nuernberger@xxxxxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/vfio/platform/vfio_platform_common.c | 10 ---------- 1 file changed, 10 deletions(-) --- a/drivers/vfio/platform/vfio_platform_common.c +++ b/drivers/vfio/platform/vfio_platform_common.c @@ -393,11 +393,6 @@ static ssize_t vfio_platform_read_mmio(s count = min_t(size_t, count, reg->size - off); - if (off >= reg->size) - return -EINVAL; - - count = min_t(size_t, count, reg->size - off); - if (!reg->ioaddr) { reg->ioaddr = ioremap(reg->addr, reg->size); @@ -479,11 +474,6 @@ static ssize_t vfio_platform_write_mmio( if (off >= reg->size) return -EINVAL; - - count = min_t(size_t, count, reg->size - off); - - if (off >= reg->size) - return -EINVAL; count = min_t(size_t, count, reg->size - off); Patches currently in stable-queue which might be from gregkh@xxxxxxxxxxxxxxxxxxx are queue-6.6/usb-cdc-acm-fill-in-renesas-r-car-d3-usb-download-mode-quirk.patch queue-6.6/x86-static-call-remove-early_boot_irqs_disabled-check-to-fix-xen-pvh-dom0.patch queue-6.6/igc-set-buffer-type-for-empty-frames-in-igc_init_empty_frame.patch queue-6.6/usb-dwc2-gadget-remove-of_node-reference-upon-udc_stop.patch queue-6.6/mlxsw-add-return-value-check-for-mlxsw_sp_port_get_stats_raw.patch queue-6.6/md-md-bitmap-factor-behind-write-counters-out-from-bitmap_-start-end-write.patch queue-6.6/usb-quirks-add-usb_quirk_no_lpm-quirk-for-teclast-dist.patch queue-6.6/drm-v3d-stop-active-perfmon-if-it-is-being-destroyed.patch queue-6.6/revert-vfio-platform-check-the-bounds-of-read-write-syscalls.patch queue-6.6/wifi-ath12k-fix-handling-of-6-ghz-rules.patch queue-6.6/btrfs-fix-hole-expansion-when-writing-at-an-offset-beyond-eof.patch queue-6.6/usb-gadget-f_midi-fix-midi-streaming-descriptor-lengths.patch queue-6.6/arm64-handle-.arm.attributes-section-in-linker-scripts.patch queue-6.6/drm-tidss-clear-the-interrupt-status-for-interrupts-being-disabled.patch queue-6.6/usb-serial-option-drop-meig-smart-defines.patch queue-6.6/batman-adv-fix-panic-during-interface-removal.patch queue-6.6/gpiolib-acpi-add-a-quirk-for-acer-nitro-anv14.patch queue-6.6/usb-serial-option-add-meig-smart-slm828.patch queue-6.6/regmap-irq-add-missing-kfree.patch queue-6.6/usb-gadget-udc-renesas_usb3-fix-compiler-warning.patch queue-6.6/arm64-filter-out-sve-hwcaps-when-feat_sve-isn-t-implemented.patch queue-6.6/usb-add-usb_quirk_no_lpm-quirk-for-sony-xperia-xz1-smartphone.patch queue-6.6/drm-tidss-fix-issue-in-irq-handling-causing-irq-flood-issue.patch queue-6.6/usb-cdc-acm-fix-handling-of-oversized-fragments.patch queue-6.6/usb-roles-set-switch-registered-flag-early-on.patch queue-6.6/alpha-make-stack-16-byte-aligned-most-cases.patch queue-6.6/hid-hid-steam-don-t-use-cancel_delayed_work_sync-in-irq-context.patch queue-6.6/x86-i8253-disable-pit-timer-0-when-not-in-use.patch queue-6.6/batman-adv-drop-unmanaged-elp-metric-worker.patch queue-6.6/cgroup-fix-race-between-fork-and-cgroup.kill.patch queue-6.6/can-ctucanfd-handle-skb-allocation-failure.patch queue-6.6/nfsd-fix-hang-in-nfsd4_shutdown_callback.patch queue-6.6/can-etas_es58x-fix-potential-null-pointer-dereference-on-udev-serial.patch queue-6.6/kvm-x86-reject-hyper-v-s-send_ipi-hypercalls-if-local-apic-isn-t-in-kernel.patch queue-6.6/vsock-orphan-socket-after-transport-release.patch queue-6.6/serial-8250-fix-fifo-underflow-on-flush.patch queue-6.6/usb-serial-option-fix-telit-cinterion-fn990a-name.patch queue-6.6/mmc-mtk-sd-fix-register-settings-for-hs400-es-mode.patch queue-6.6/usb-dwc3-fix-timeout-issue-during-controller-enter-exit-from-halt-state.patch queue-6.6/serial-port-always-update-iotype-in-__uart_read_properties.patch queue-6.6/batman-adv-ignore-neighbor-throughput-metrics-in-error-case.patch queue-6.6/md-md-bitmap-move-bitmap_-start-end-write-to-md-upper-layer.patch queue-6.6/usb-serial-option-add-telit-cinterion-fn990b-compositions.patch queue-6.6/md-add-a-new-callback-pers-bitmap_sector.patch queue-6.6/md-raid5-implement-pers-bitmap_sector.patch queue-6.6/efi-avoid-cold-plugged-memory-for-placing-the-kernel.patch queue-6.6/usb-pci-quirks-fix-hccparams-register-error-for-ls7a-ehci.patch queue-6.6/io_uring-kbuf-reallocate-buf-lists-on-upgrade.patch queue-6.6/md-raid5-recheck-if-reshape-has-finished-with-device_lock-held.patch queue-6.6/alpha-align-stack-for-page-fault-and-user-unaligned-trap-handlers.patch queue-6.6/kbuild-userprogs-fix-bitsize-and-target-detection-on-clang.patch queue-6.6/drm-amd-display-add-null-check-for-head_pipe-in-dcn201_acquire_free_pipe_for_layer.patch queue-6.6/alpha-replace-hardcoded-stack-offsets-with-autogenerated-ones.patch queue-6.6/partitions-mac-fix-handling-of-bogus-partition-table.patch queue-6.6/usb-cdc-acm-check-control-transfer-buffer-size-before-access.patch queue-6.6/netdevsim-print-human-readable-ip-address.patch queue-6.6/drm-amd-display-pass-non-null-to-dcn20_validate_apply_pipe_split_flags.patch queue-6.6/usb-gadget-f_midi-fixing-wmaxpacketsize-exceeded-issue-during-midi-bind-retries.patch queue-6.6/vsock-keep-the-binding-until-socket-destruction.patch queue-6.6/gpio-stmpe-check-return-value-of-stmpe_reg_read-in-stmpe_gpio_irq_sync_unlock.patch queue-6.6/serial-port-assign-iotype-correctly-when-iobase-is-set.patch queue-6.6/mm-gup-fix-infinite-loop-within-__get_longterm_locked.patch queue-6.6/md-md-bitmap-remove-the-last-parameter-for-bimtap_ops-endwrite.patch queue-6.6/drm-rcar-du-dsi-fix-phy-lock-bit-check.patch queue-6.6/selftests-rtnetlink-update-netdevsim-ipsec-output-format.patch queue-6.6/usb-hub-ignore-non-compliant-devices-with-too-many-configs-or-interfaces.patch queue-6.6/regulator-qcom_smd-add-l2-l5-sub-node-to-mp5496-regulator.patch queue-6.6/can-c_can-fix-unbalanced-runtime-pm-disable-in-error-path.patch queue-6.6/nfsd-clear-acl_access-acl_default-after-releasing-them.patch queue-6.6/perf-x86-intel-ensure-lbrs-are-disabled-when-a-cpu-is-starting.patch queue-6.6/kvm-nsvm-enter-guest-mode-before-initializing-nested-npt-mmu.patch queue-6.6/can-j1939-j1939_sk_send_loop-fix-unable-to-send-messages-with-data-length-zero.patch queue-6.6/drm-amdgpu-avoid-buffer-overflow-attach-in-smu_sys_set_pp_table.patch queue-6.6/usb-core-fix-pipe-creation-for-get_bmaxpacketsize0.patch