2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/gpu/drm/i915/selftests
Dan Carpenter caa7c7a76b drm/i915/selftests: Change mock_request() to return error pointers
There was an error pointer vs NULL bug in __igt_breadcrumbs_smoketest().
The __mock_request_alloc() function implements the
smoketest->request_alloc() function pointer.  It was supposed to return
error pointers, but it propogates the NULL return from mock_request()
so in the event of a failure, it would lead to a NULL pointer
dereference.

To fix this, change the mock_request() function to return error pointers
and update all the callers to expect that.

Fixes: 52c0fdb25c ("drm/i915: Replace global breadcrumbs with per-context interrupt tracking")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/685c1417.050a0220.696f5.5c05@mx.google.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
(cherry picked from commit 778fa8ad5f)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2025-06-30 08:12:33 +03:00
..
i915_active.c
i915_gem_evict.c
i915_gem_gtt.c Merge tag 'drm-intel-next-2025-02-24' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 2025-02-27 07:13:41 +10:00
i915_gem.c Merge tag 'drm-intel-gt-next-2025-02-26' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 2025-03-13 07:54:41 +10:00
i915_live_selftests.h
i915_mock_selftests.h
i915_perf_selftests.h
i915_perf.c
i915_random.c
i915_random.h drm/i915/selftests: Include <linux/prandom.h> instead of <linux/random.h> 2024-10-03 18:19:03 +02:00
i915_request.c drm/i915/selftests: Change mock_request() to return error pointers 2025-06-30 08:12:33 +03:00
i915_selftest.c drm/i915: Disable RPG during live selftest 2025-04-07 11:00:07 +03:00
i915_sw_fence.c
i915_syncmap.c
i915_vma.c drm/i915/selftests: fix typos in i915/selftests files 2025-01-23 05:48:23 -05:00
igt_atomic.c
igt_atomic.h
igt_flush_test.c drm/i915/selftests: Use preemption timeout on cleanup 2024-12-20 23:34:43 +01:00
igt_flush_test.h
igt_live_test.c
igt_live_test.h
igt_mmap.c
igt_mmap.h
igt_reset.c
igt_reset.h
igt_spinner.c
igt_spinner.h
intel_memory_region.c drm/i915: Replace double blank with single blank after comma in gem/ and gt/ 2024-08-08 11:40:41 +01:00
intel_scheduler_helpers.c drm/i915/selftests: Fix dependency of some timeouts on HZ 2024-03-06 15:33:57 +02:00
intel_scheduler_helpers.h
intel_uncore.c drm/i915: Drop dead code for pvc 2024-03-22 14:14:56 -07:00
lib_sw_fence.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
lib_sw_fence.h
librapl.c x86/msr: Rename 'rdmsrl_safe()' to 'rdmsrq_safe()' 2025-04-10 11:58:38 +02:00
librapl.h
mock_drm.h
mock_gem_device.c drm/i915/display: pass struct pci_dev * to intel_display_device_probe() 2024-11-12 09:58:53 +02:00
mock_gem_device.h
mock_gtt.c
mock_gtt.h
mock_region.c
mock_region.h
mock_request.c drm/i915/selftests: Change mock_request() to return error pointers 2025-06-30 08:12:33 +03:00
mock_request.h
mock_uncore.c
mock_uncore.h
scatterlist.c drm/i915/selftests: Include <linux/prandom.h> instead of <linux/random.h> 2024-10-03 18:19:03 +02:00