linux/drivers/gpu/drm
Zhenhao Wan caa1bc2a0a drm/nouveau/dmem: fix mismatched DMA unmap size for large folios
Device-private THP migration maps migration buffers with page_size()
and records that length in dma_info->size.  For a compound folio
page_size() is PAGE_SIZE << order, but two teardown sites still pass a
literal PAGE_SIZE to dma_unmap_page():

  - nouveau_dmem_migrate_to_ram() on the success path, and
  - nouveau_dmem_migrate_copy_one() on the copy-error path.

For an order > 0 folio this unmaps less than was mapped, leaking the
remainder of the IOMMU/IOVA mapping.  The other unmap sites, in
nouveau_dmem_migrate_chunk() and nouveau_dmem_evict_chunk(), already
use the saved size; use it here too.

Fixes: c322874710 ("gpu/drm/nouveau: enable THP support for GPU memory migration")
Reported-by: Yuhao Jiang <danisjiang@gmail.com>
Assisted-by: Claude:claude-opus-5
Cc: stable@vger.kernel.org
Signed-off-by: Zhenhao Wan <whi4ed0g@gmail.com>
Link: https://patch.msgid.link/20260811-b4-nouveau-dmem-thp-fixes-v1-1-2cdf9860af2a@gmail.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-09-01 11:09:24 +02:00
..
adp drm/adp: mipi: Add atomic bridge state handlers 2026-07-15 09:45:46 +02:00
amd drm next/fixes for 7.3-rc1 2026-08-28 16:37:55 -07:00
arm drm/arm/komeda: fix error handling for clk_prepare_enable() and callers 2026-06-30 15:26:54 +01:00
armada
aspeed Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
ast
atmel-hlcdc
bridge Linux 7.2 2026-08-20 10:58:44 +10:00
ci hwrng: qcom - Move qcom-rng.c into drivers/char/hw_random/ 2026-07-05 13:22:35 +08:00
clients Linux 7.2 2026-08-20 10:58:44 +10:00
display Linux 7.2 2026-08-20 10:58:44 +10:00
etnaviv drm for 7.3-rc1 2026-08-21 08:41:00 -07:00
exynos drm for 7.3-rc1 2026-08-21 08:41:00 -07:00
fsl-dcu drm/panel: of_drm_find_panel() return a counted reference 2026-07-20 15:07:22 +02:00
gma500 drm for 7.3-rc1 2026-08-21 08:41:00 -07:00
gud drm/gud: validate GUD_ROTATION_0 is present in supported rotations 2026-08-23 17:35:13 +01:00
hisilicon drm-misc-next for 7.3: 2026-07-07 09:34:04 +10:00
hyperv drm/hyperv: Move MODULE_DEVICE_TABLE to the device_id arrays 2026-07-20 10:33:49 -04:00
i915 mm.git review status for linus..mm-stable 2026-08-27 09:17:06 -07:00
imagination power sequencing updates for v7.3-rc1 2026-08-26 08:45:09 -07:00
imx drm: fix missing header include for drm_panel_put() 2026-07-22 13:50:27 +02:00
ingenic drm/panel: of_drm_find_panel() return a counted reference 2026-07-20 15:07:22 +02:00
kmb
lima Linux 7.2 2026-08-20 10:58:44 +10:00
logicvc drm/panel: of_drm_find_panel() return a counted reference 2026-07-20 15:07:22 +02:00
loongson drm: Consistently define pci_device_ids using named initializers 2026-06-17 11:07:01 +02:00
mcde drm/panel: of_drm_find_panel() return a counted reference 2026-07-20 15:07:22 +02:00
mediatek Linux 7.2 2026-08-20 10:58:44 +10:00
meson drm-misc-next for 7.3: 2026-07-07 09:34:04 +10:00
mgag200 drm: Consistently define pci_device_ids using named initializers 2026-06-17 11:07:01 +02:00
msm drm next/fixes for 7.3-rc1 2026-08-28 16:37:55 -07:00
mxsfb drm: fix missing header include for drm_panel_put() 2026-07-22 13:50:27 +02:00
nouveau drm/nouveau/dmem: fix mismatched DMA unmap size for large folios 2026-09-01 11:09:24 +02:00
nova drm for 7.3-rc1 2026-08-21 08:41:00 -07:00
omapdrm drm for 7.3-rc1 2026-08-21 08:41:00 -07:00
panel Linux 7.2 2026-08-20 10:58:44 +10:00
panfrost Linux 7.2 2026-08-20 10:58:44 +10:00
panthor mm.git review status for linus..mm-stable 2026-08-27 09:17:06 -07:00
pl111 drm/panel: of_drm_find_panel() return a counted reference 2026-07-20 15:07:22 +02:00
qxl drm/qxl: remove dependency on DRM simple helpers 2026-07-10 15:08:57 +02:00
radeon drm/radeon: fix internal display on iMac11, 1 (RV770/DCE3.1) 2026-08-19 10:12:25 -04:00
renesas drm/panel: of_drm_find_panel() return a counted reference 2026-07-20 15:07:22 +02:00
rockchip drm for 7.3-rc1 2026-08-21 08:41:00 -07:00
scheduler Linux 7.2 2026-08-20 10:58:44 +10:00
sitronix
solomon drm/ssd130x: Add per-family update backlight logic 2026-08-06 14:55:55 +02:00
sprd Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
sti drm/panel: of_drm_find_panel() return a counted reference 2026-07-20 15:07:22 +02:00
stm drm: fix missing header include for drm_panel_put() 2026-07-22 13:50:27 +02:00
sun4i drm/sun4i: hdmi-phy: Fix H6 8-bit MPLL config at 594 MHz 2026-08-06 14:22:50 +08:00
sysfb Merge drm/drm-fixes into drm-misc-fixes 2026-09-01 09:38:51 +02:00
tegra Merge drm/drm-fixes into drm-misc-fixes 2026-09-01 09:38:51 +02:00
tests Linux 7.2 2026-08-20 10:58:44 +10:00
tidss drm/panel: of_drm_find_panel() return a counted reference 2026-07-20 15:07:22 +02:00
tilcdc Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
tiny Merge drm/drm-fixes into drm-misc-fixes 2026-09-01 09:38:51 +02:00
ttm mm.git review status for linus..mm-stable 2026-08-27 09:17:06 -07:00
tve200 drm/tve200: add OF module alias for autoloading 2026-07-24 09:21:03 +02:00
tyr drm for 7.3-rc1 2026-08-21 08:41:00 -07:00
udl
v3d Linux 7.2 2026-08-20 10:58:44 +10:00
vboxvideo
vc4 Linux 7.2 2026-08-20 10:58:44 +10:00
verisilicon drm/verisilicon: Switch to atomic_create_state 2026-06-22 11:24:55 +02:00
vgem
virtio Merge drm/drm-fixes into drm-misc-fixes 2026-09-01 09:38:51 +02:00
vkms
vmwgfx mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
xe drm next/fixes for 7.3-rc1 2026-08-28 16:37:55 -07:00
xen mm: introduce vma_get_page_prot() and use it 2026-08-06 18:57:03 -07:00
xlnx drm/xlnx: zynqmp_dp: Switch to atomic_create_state 2026-06-22 11:24:56 +02:00
drm_atomic_helper.c drm/atomic-helper: Add HDMI bridge output bus formats helper 2026-06-09 21:03:50 +01:00
drm_atomic_state_helper.c drm/bridge: Remove atomic_reset support 2026-06-22 11:25:00 +02:00
drm_atomic_uapi.c Merge drm/drm-fixes into drm-misc-fixes 2026-09-01 09:38:51 +02:00
drm_atomic.c drm/bridge: rename drm_for_each_bridge_in_chain_scoped() to drm_for_each_bridge_in_chain() 2026-07-14 17:55:51 +02:00
drm_auth.c
drm_blend.c drm/drm_blend: allow blend mode property without PREMULTI 2026-07-14 19:22:48 +01:00
drm_bridge_helper.c
drm_bridge.c drm/bridge: Remove legacy bridge callback support 2026-07-15 09:46:16 +02:00
drm_buddy.c gpu/buddy: Track per-order used blocks with a scoreboard 2026-05-29 13:44:01 +02:00
drm_cache.c x86/cpu: Hide and rename static_cpu_has() 2026-07-06 21:34:26 -07:00
drm_client_event.c
drm_client_modeset.c
drm_client_sysrq.c
drm_client.c
drm_color_mgmt.c mm.git review status for mm-hotfixes-stable..mm-nonmm-stable 2026-06-21 13:20:19 -07:00
drm_colorop.c drm-misc-next for 7.3: 2026-07-06 17:38:49 +10:00
drm_connector.c drm-misc-next for 7.3: 2026-07-06 17:38:49 +10:00
drm_crtc_helper_internal.h
drm_crtc_helper.c
drm_crtc_internal.h
drm_crtc.c
drm_damage_helper.c
drm_debugfs_crc.c
drm_debugfs.c
drm_displayid_internal.h Merge drm/drm-next into drm-misc-next 2026-06-30 10:16:00 +02:00
drm_displayid.c
drm_draw_internal.h drm/draw: Remove unused helper drm_draw_get_char_bitmap() 2026-06-04 09:44:11 +02:00
drm_draw.c
drm_drv.c DRM Rust changes for v7.3-rc1 2026-08-10 14:48:11 +10:00
drm_dumb_buffers.c drm-misc-next for 7.3: 2026-07-06 17:38:49 +10:00
drm_edid_load.c
drm_edid.c Merge drm/drm-next into drm-misc-next 2026-06-30 10:16:00 +02:00
drm_eld.c
drm_encoder.c
drm_exec.c drm/exec: Use kvmalloc_objs for exec->objects 2026-07-07 23:16:33 +08:00
drm_fb_dma_helper.c
drm_fb_helper.c Linux 7.2 2026-08-20 10:58:44 +10:00
drm_fbdev_dma.c
drm_fbdev_shmem.c
drm_fbdev_ttm.c
drm_file.c
drm_flip_work.c
drm_format_helper.c
drm_format_internal.h
drm_fourcc.c
drm_framebuffer.c
drm_gem_atomic_helper.c
drm_gem_dma_helper.c mm: introduce vma_get_page_prot() and use it 2026-08-06 18:57:03 -07:00
drm_gem_framebuffer_helper.c
drm_gem_shmem_helper.c mm.git review status for linus..mm-stable 2026-08-27 09:17:06 -07:00
drm_gem_ttm_helper.c
drm_gem_vram_helper.c
drm_gem.c drm for 7.3-rc1 2026-08-21 08:41:00 -07:00
drm_gpusvm.c drm for 7.3-rc1 2026-08-21 08:41:00 -07:00
drm_gpuvm.c drm/gpuvm: Remove dead code 2026-07-03 23:32:55 +02:00
drm_internal.h
drm_ioc32.c
drm_ioctl.c drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE 2026-07-07 14:57:10 +02:00
drm_kms_helper_common.c
drm_lease.c
drm_managed.c drm/managed: use special gfp_t format specifier 2026-05-28 21:04:52 -07:00
drm_mipi_dbi.c
drm_mipi_dsi.c
drm_mm.c
drm_mode_config.c drm: use drm_warn() in validate_blend_mode_for_alpha_formats() 2026-08-14 14:43:23 +01:00
drm_mode_object.c
drm_modes.c drm/modes: Add DRM_MODE_MATCH_TIMINGS_VRR 2026-06-24 18:54:10 +03:00
drm_modeset_helper.c
drm_modeset_lock.c drm: remove dead WARN_ON NULL check after GFP_NOFAIL allocation 2026-08-05 11:20:13 -07:00
drm_of.c drm/panel: of_drm_find_panel() return a counted reference 2026-07-20 15:07:22 +02:00
drm_pagemap_util.c
drm_pagemap.c drm/pagemap: Reset migration page count on eviction retry 2026-08-31 14:56:05 -07:00
drm_panel_backlight_quirks.c drm/amd/display: Force PWM backlight on Lenovo Legion 5 15ARH05 2026-07-17 17:41:15 -04:00
drm_panel_orientation_quirks.c
drm_panel.c drm/panel: find_panel_by_fwnode() return a counted reference 2026-07-20 15:08:08 +02:00
drm_panic_qr.rs
drm_panic.c drm/panic: Look up glyph shape with font helper 2026-06-04 09:44:10 +02:00
drm_pci.c
drm_plane_helper.c
drm_plane.c
drm_prime.c drm/prime: use dma_buf_fd_install() to preserve export tracing 2026-08-24 14:19:43 +02:00
drm_print.c drm/print: describe 6th & 9th bit of drm.debug 2026-06-03 11:24:52 +02:00
drm_privacy_screen_x86.c
drm_privacy_screen.c
drm_probe_helper.c drm: Send per-connector hotplug events 2026-07-21 17:06:42 +01:00
drm_property.c
drm_ras_genl_family.c
drm_ras_nl.c
drm_ras_nl.h
drm_ras.c
drm_rect.c
drm_self_refresh_helper.c
drm_simple_kms_helper.c
drm_suballoc.c
drm_syncobj.c drm/syncobj: Use kmalloc_objs for chains 2026-07-07 23:26:39 +08:00
drm_sysfs.c
drm_trace_points.c
drm_trace.h
drm_vblank_helper.c
drm_vblank_work.c
drm_vblank.c
drm_vma_manager.c
drm_writeback.c drm: writeback: Document behaviour for framebuffer size mismatch 2026-06-15 22:28:26 +01:00
Kconfig
Kconfig.debug
Makefile gpu: build nova-core and nova-drm from drivers/gpu/Makefile 2026-06-29 11:28:38 +02:00