linux/drivers/gpu/drm/ttm
Simon Richter 47a85604a7 drm/ttm: Avoid NULL pointer deref for evicted BOs
commit 491adc6a0f upstream.

It is possible for a BO to exist that is not currently associated with a
resource, e.g. because it has been evicted.

When devcoredump tries to read the contents of all BOs for dumping, we need
to expect this as well -- in this case, ENODATA is recorded instead of the
buffer contents.

Fixes: 7d08df5d0b ("drm/ttm: Add ttm_bo_access")
Fixes: 09ac4fcb3f ("drm/ttm: Implement vm_operations_struct.access v2")
Cc: stable <stable@kernel.org>
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6271
Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Shuicheng Lin <shuicheng.lin@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20251013161241.709916-1-Simon.Richter@hogyros.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-01-19 13:10:03 +01:00
..
Makefile drm/ttm: add ttm_sys_manager v3 2021-05-03 12:50:41 +02:00
ttm_agp_backend.c drm/ttm: cleanup ttm_agp_backend 2021-05-03 12:50:41 +02:00
ttm_bo.c drm/ttm: check null pointer before accessing when swapping 2023-08-11 15:13:57 +02:00
ttm_bo_util.c drm/ttm: fix memleak in ttm_transfered_destroy 2021-10-21 15:27:21 +02:00
ttm_bo_vm.c drm/ttm: Avoid NULL pointer deref for evicted BOs 2026-01-19 13:10:03 +01:00
ttm_device.c drm/ttm: Reorder sys manager cleanup step 2023-11-08 17:26:47 +01:00
ttm_execbuf_util.c drm/ttm: switch to per device LRU lock 2021-03-24 17:05:25 +01:00
ttm_module.c drm/ttm: Initialize debugfs from ttm_global_init() 2021-07-22 12:09:12 +02:00
ttm_module.h drm/ttm: add ttm_sys_manager v3 2021-05-03 12:50:41 +02:00
ttm_pool.c drm/ttm: Respect the shrinker core free target 2025-08-28 16:24:22 +02:00
ttm_range_manager.c drm/ttm: add ttm_resource_fini v2 2024-03-26 18:21:25 -04:00
ttm_resource.c drm/ttm: Should to return the evict error 2025-08-28 16:24:22 +02:00
ttm_sys_manager.c drm/ttm: add ttm_resource_fini v2 2024-03-26 18:21:25 -04:00
ttm_tt.c drm/ttm: Include pagemap.h from ttm_tt.h 2021-08-16 14:44:05 +02:00