diff options
author | Maxime Ripard <mripard@kernel.org> | 2025-04-03 15:33:32 +0200 |
---|---|---|
committer | Maxime Ripard <mripard@kernel.org> | 2025-04-07 10:29:44 +0200 |
commit | 7e0351ae91ed2b6178abbfae96c3c6aaa1652567 (patch) | |
tree | 8d6f4e13113d07861cb63f1ec2e129604bfb2fcb /scripts/dev-needs.sh | |
parent | 321e644716a3dd517cfa0a035deb3a2a0209f0db (diff) |
drm/vc4: tests: Stop allocating the state in test init
The vc4-pv-muxing-combinations and vc5-pv-muxing-combinations test
suites use a common test init function which, in part, allocates the
drm atomic state the test will use.
That allocation relies on drm_kunit_helper_atomic_state_alloc(), and
thus requires a struct drm_modeset_acquire_ctx. This context will then
be stored in the allocated state->acquire_ctx field.
However, the context is local to the test init function, and is cleared
as soon as drm_kunit_helper_atomic_state_alloc() is done. We thus end up
with an dangling pointer to a cleared context in state->acquire_ctx for
our test to consumes.
We should really allocate the context and the state in the test
functions, so we can also control when we're done with it.
Fixes: 30188df0c387 ("drm/tests: Drop drm_kunit_helper_acquire_ctx_alloc()")
Reviewed-by: MaĆra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20250403-drm-vc4-kunit-failures-v2-3-e09195cc8840@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'scripts/dev-needs.sh')
0 files changed, 0 insertions, 0 deletions