umber-kernel/drivers/gpu/drm
Pierre-Eric Pelloux-Prayer 89a9389ad7 drm/amdgpu: fix sync handling in amdgpu_dma_buf_move_notify
[ Upstream commit b18fc0ab837381c1a6ef28386602cd888f2d9edf ]

Invalidating a dmabuf will impact other users of the shared BO.
In the scenario where process A moves the BO, it needs to inform
process B about the move and process B will need to update its
page table.

The commit fixes a synchronisation bug caused by the use of the
ticket: it made amdgpu_vm_handle_moved behave as if updating
the page table immediately was correct but in this case it's not.

An example is the following scenario, with 2 GPUs and glxgears
running on GPU0 and Xorg running on GPU1, on a system where P2P
PCI isn't supported:

glxgears:
  export linear buffer from GPU0 and import using GPU1
  submit frame rendering to GPU0
  submit tiled->linear blit
Xorg:
  copy of linear buffer

The sequence of jobs would be:
  drm_sched_job_run                       # GPU0, frame rendering
  drm_sched_job_queue                     # GPU0, blit
  drm_sched_job_done                      # GPU0, frame rendering
  drm_sched_job_run                       # GPU0, blit
  move linear buffer for GPU1 access      #
  amdgpu_dma_buf_move_notify -> update pt # GPU0

It this point the blit job on GPU0 is still running and would
likely produce a page fault.

Cc: stable@vger.kernel.org
Fixes: a448cb003e ("drm/amdgpu: implement amdgpu_gem_prime_move_notify v2")
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-03-04 07:21:29 -05:00
..
adp
amd drm/amdgpu: fix sync handling in amdgpu_dma_buf_move_notify 2026-03-04 07:21:29 -05:00
arm
armada
aspeed
ast drm/ast: Clear preserved bits from register output value 2025-10-30 20:44:44 +01:00
atmel-hlcdc drm/atmel-hlcdc: fix use-after-free of drm_crtc_commit after release 2026-03-04 07:20:02 -05:00
bridge drm/bridge: anx7625: Fix invalid EDID size 2026-03-04 07:21:10 -05:00
ci drm/ci: disable broken MR check in sanity job 2025-10-16 07:49:06 -07:00
clients drm/client: fix MODULE_PARM_DESC string for "active" 2025-11-13 14:15:24 +01:00
display drm/display/dp_mst: Add protection against 0 vcpi 2026-03-04 07:19:45 -05:00
etnaviv drm/etnaviv: fix flush sequence logic 2025-10-27 22:47:09 +01:00
exynos drm/exynos: vidi: fix to avoid directly dereferencing user pointer 2026-02-26 14:59:47 -08:00
fsl-dcu
gma500 drm/gma500: Remove unused helper psb_fbdev_fb_setcolreg() 2026-01-08 10:17:16 +01:00
gud drm/gud: fix NULL fb and crtc dereferences on USB disconnect 2026-01-23 11:21:13 +01:00
hisilicon drm/hisilicon/hibmc: Adding reset colorbar cfg in dp init. 2026-02-26 14:59:13 -08:00
hyperv
i915 drm/i915/quirks: Fix device id for QUIRK_EDP_LIMIT_RATE_HBR2 entry 2026-03-04 07:21:26 -05:00
imagination drm/imagination: Wait for FW trace update command completion 2026-01-30 10:32:17 +01:00
imx drm/imx/tve: fix probe device leak 2026-02-06 16:57:43 +01:00
ingenic
kmb
lib
lima
logicvc
loongson
mcde
mediatek drm/mediatek: dpi: Find next bridge during probe 2026-01-30 10:32:17 +01:00
meson
mgag200 drm/mgag200: fix mgag200_bmc_stop_scanout() 2026-02-11 13:41:58 +01:00
msm drm/msm/dp: Avoid division by zero in msm_dp_ctrl_config_msa() 2026-02-26 14:59:13 -08:00
mxsfb
nouveau nouveau/gsp: fix suspend/resume regression on r570 firmware 2026-02-11 13:41:43 +01:00
nova drm: nova: depend on CONFIG_64BIT 2026-01-08 10:16:41 +01:00
omapdrm
panel drm/panel: Fix a possible null-pointer dereference in jdi_panel_dsi_remove() 2026-03-04 07:19:56 -05:00
panfrost
panthor drm/panthor: fix for dma-fence safe access rules 2026-03-04 07:20:53 -05:00
pl111 drm/pl111: Fix error handling in pl111_amba_probe 2026-01-17 16:35:13 +01:00
qxl
radeon drm/radeon: Add HAINAN clock adjustment 2026-03-04 07:20:41 -05:00
renesas drm: renesas: rz-du: mipi_dsi: fix kernel panic when rebooting for some panels 2026-03-04 07:19:59 -05:00
rockchip drm/rockchip: dw_hdmi_qp: Fix RK3576 HPD interrupt handling 2026-02-26 14:59:13 -08:00
scheduler drm/sched: Fix deadlock in drm_sched_entity_kill_jobs_cb 2025-11-05 12:29:52 +01:00
sitronix
solomon
sprd
sti drm: sti: fix device leaks at component probe 2025-11-24 13:56:16 +01:00
stm
sun4i
sysfb drm/sysfb: Remove duplicate declarations 2026-01-23 11:21:31 +01:00
tegra drm/tegra: hdmi: sor: Fix error: variable ‘j’ set but not used 2026-02-19 16:31:32 +01:00
tests drm/tests: shmem: Hold reservation lock around purge 2026-03-04 07:20:55 -05:00
tidss drm/tidss: Fix enable/disable order 2026-01-17 16:35:13 +01:00
tilcdc drm/tilcdc: Fix removal actions in case of failed probe 2026-01-08 10:17:18 +01:00
tiny drm/tiny: pixpaper: add explicit dependency on MMU 2025-11-06 13:47:29 +01:00
ttm drm/ttm: Avoid NULL pointer deref for evicted BOs 2026-01-08 10:17:18 +01:00
tve200
tyr drm/tyr: fix register name in error print 2026-03-04 07:21:08 -05:00
udl
v3d drm/v3d: Set DMA segment size to avoid debug warnings 2026-03-04 07:19:50 -05:00
vboxvideo
vc4
vgem drm/vgem-fence: Fix potential deadlock on release 2025-12-18 14:02:26 +01:00
virtio
vkms
vmwgfx drm/vmwgfx: Fix an error return check in vmw_compat_shader_add() 2026-01-23 11:21:32 +01:00
xe drm/xe: Fix ggtt fb alignment 2026-03-04 07:20:55 -05:00
xen
xlnx
Kconfig drm, drm/xe: Fix xe userptr in the absence of CONFIG_DEVICE_PRIVATE 2026-01-30 10:32:15 +01:00
Kconfig.debug
Makefile drm, drm/xe: Fix xe userptr in the absence of CONFIG_DEVICE_PRIVATE 2026-01-30 10:32:15 +01:00
drm_atomic.c
drm_atomic_helper.c drm/atomic-helper: Export and namespace some functions 2026-01-17 16:35:13 +01:00
drm_atomic_state_helper.c
drm_atomic_uapi.c
drm_auth.c
drm_blend.c
drm_bridge.c
drm_bridge_helper.c
drm_buddy.c drm/buddy: Prevent BUG_ON by validating rounded allocation 2026-03-04 07:21:10 -05:00
drm_cache.c
drm_client.c
drm_client_event.c
drm_client_modeset.c
drm_color_mgmt.c
drm_connector.c
drm_crtc.c
drm_crtc_helper.c
drm_crtc_helper_internal.h
drm_crtc_internal.h
drm_damage_helper.c
drm_debugfs.c
drm_debugfs_crc.c
drm_displayid.c drm/displayid: add quirk to ignore DisplayID checksum errors 2026-01-08 10:16:42 +01:00
drm_displayid_internal.h drm/displayid: add quirk to ignore DisplayID checksum errors 2026-01-08 10:16:42 +01:00
drm_draw.c drm/draw: fix color truncation in drm_draw_fill24 2025-10-14 09:25:10 +02:00
drm_draw_internal.h drm/draw: fix color truncation in drm_draw_fill24 2025-10-14 09:25:10 +02:00
drm_drv.c
drm_dumb_buffers.c
drm_edid.c
drm_edid_load.c
drm_eld.c
drm_encoder.c
drm_exec.c
drm_fb_dma_helper.c
drm_fb_helper.c drm, fbcon, vga_switcheroo: Avoid race condition in fbcon setup 2025-11-25 09:08:32 +01: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.c drm: Do not allow userspace to trigger kernel warnings in drm_gem_change_handle_ioctl() 2026-02-06 16:57:42 +01:00
drm_gem_atomic_helper.c drm/sysfb: Do not dereference NULL pointer in plane reset 2025-10-26 17:09:56 +01:00
drm_gem_dma_helper.c
drm_gem_framebuffer_helper.c
drm_gem_shmem_helper.c drm/tests: shmem: Hold reservation lock around purge 2026-03-04 07:20:55 -05:00
drm_gem_ttm_helper.c
drm_gem_vram_helper.c
drm_gpusvm.c drm/gpusvm, drm/xe: Fix userptr to not allow device private pages 2025-10-02 21:57:52 -07:00
drm_gpuvm.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c
drm_kms_helper_common.c
drm_lease.c
drm_managed.c
drm_mipi_dbi.c
drm_mipi_dsi.c
drm_mm.c
drm_mode_config.c
drm_mode_object.c
drm_modes.c
drm_modeset_helper.c
drm_modeset_lock.c
drm_of.c
drm_pagemap.c drm/pagemap, drm/xe: Ensure that the devmem allocation is idle before use 2026-01-08 10:17:20 +01:00
drm_panel.c
drm_panel_backlight_quirks.c
drm_panel_orientation_quirks.c
drm_panic.c drm/panic: Fix 24bit pixel crossing page boundaries 2025-10-21 11:28:03 +02:00
drm_panic_qr.rs
drm_pci.c
drm_plane.c drm/plane: Fix IS_ERR() vs NULL check in drm_plane_create_hotspot_properties() 2025-12-18 14:03:36 +01:00
drm_plane_helper.c
drm_prime.c
drm_print.c
drm_privacy_screen.c
drm_privacy_screen_x86.c
drm_probe_helper.c
drm_property.c drm: Account property blob allocations to memcg 2026-03-04 07:19:59 -05:00
drm_rect.c
drm_self_refresh_helper.c
drm_simple_kms_helper.c
drm_suballoc.c
drm_syncobj.c
drm_sysfs.c
drm_trace.h
drm_trace_points.c
drm_vblank.c
drm_vblank_work.c
drm_vma_manager.c
drm_writeback.c