mirror_ubuntu-kernels/drivers/gpu/drm/tests
Arthur Grillo 0f249678fe
drm/tests: Alloc drm_device on drm_exec tests
The drm_exec tests where crashing[0] because of a null dereference. This
is caused by a new access of the `driver` attribute of `struct
drm_driver` on drm_gem_private_object_init(). Alloc the drm_device to
fix that.

[0]
[15:05:24] ================== drm_exec (6 subtests) ===================
[15:05:24] [PASSED] sanitycheck
^CERROR:root:Build interruption occurred. Cleaning console.
[15:05:50] [ERROR] Test: drm_exec: missing expected subtest!
[15:05:50] BUG: kernel NULL pointer dereference, address: 00000000000000b0
[15:05:50] #PF: supervisor read access in kernel mode
[15:05:50] #PF: error_code(0x0000) - not-present page
[15:05:50] PGD 0 P4D 0
[15:05:50] Oops: 0000 [#1] PREEMPT NOPTI
[15:05:50] CPU: 0 PID: 23 Comm: kunit_try_catch Tainted: G                 N 6.4.0-rc7-02032-ge6303f323b1a #69
[15:05:50] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-1.fc37 04/01/2014
[15:05:50] RIP: 0010:drm_gem_private_object_init+0x60/0xc0

Fixes: e6303f323b ("drm: manager to keep track of GPUs VA mappings")
Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
Tested-by: Danilo Krummrich <dakr@redhat.com>
Acked-by: Danilo Krummrich <dakr@redhat.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731182241.240556-1-arthurgrillo@riseup.net
2023-08-01 09:30:13 +02:00
..
.kunitconfig
drm_buddy_test.c drm: test: Fix 32-bit issue in drm_buddy_test 2023-03-29 17:14:15 +02:00
drm_client_modeset_test.c drm/tests: client-modeset: Remove call to drm_kunit_helper_free_device() 2023-07-31 14:19:57 +02:00
drm_cmdline_parser_test.c drm/modes: Introduce the tv_mode property as a command-line option 2022-11-24 12:42:39 +01:00
drm_connector_test.c drm/connector: Add a function to lookup a TV mode by its name 2022-11-24 12:42:39 +01:00
drm_damage_helper_test.c drm/tests: Change "igt_" prefix to "drm_test_" 2022-09-14 13:53:33 -03:00
drm_dp_mst_helper_test.c drm/tests: Split drm_test_dp_mst_sideband_msg_req_decode into parameterized tests 2022-10-16 14:47:53 -03:00
drm_exec_test.c drm/tests: Alloc drm_device on drm_exec tests 2023-08-01 09:30:13 +02:00
drm_format_helper_test.c drm/format-helper: Use drm_format_info_min_pitch() in tests helper 2023-03-17 16:59:54 +01:00
drm_format_test.c drm/tests: Change "igt_" prefix to "drm_test_" 2022-09-14 13:53:33 -03:00
drm_framebuffer_test.c drm/tests: Fix swapped drm_framebuffer tests parameter names 2023-06-28 20:39:15 -03:00
drm_kunit_helpers.c drm/tests: helpers: Create a helper to allocate an atomic state 2023-07-31 14:19:57 +02:00
drm_managed_test.c drm/tests: Add a test for DRM managed actions 2022-12-08 09:56:55 +01:00
drm_mm_test.c drm/tests: reduce drm_mm_test stack usage 2022-12-23 19:08:26 -03:00
drm_modes_test.c drm/tests: modes: Remove call to drm_kunit_helper_free_device() 2023-07-31 14:19:57 +02:00
drm_plane_helper_test.c drm/plane_helper: Split into parameterized test cases 2022-10-20 08:13:30 -03:00
drm_probe_helper_test.c drm/tests: probe-helper: Remove call to drm_kunit_helper_free_device() 2023-07-31 14:19:57 +02:00
drm_rect_test.c drm/test: Add test cases for drm_rect_rotate_inv() 2023-04-24 16:33:26 -03:00
Makefile drm: add drm_exec selftests v4 2023-07-12 14:14:23 +02:00