On Fri, Aug 29, 2025 at 09:55:39AM +0200, Danilo Krummrich wrote:
> Since commit e7fa80e2932c ("drm_gem: add mutex to drm_gem_object.gpuva")
> it is possible for test_prepare_array() to exceed a stack frame size of
> 2048 bytes depending on the exact configuration of the kernel.
>
> drivers/gpu/drm/tests/drm_exec_test.c: In function ‘test_prepare_array’:
> drivers/gpu/drm/tests/drm_exec_test.c:171:1: error: the frame size of 2128
> bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
> 171 | }
> | ^
> cc1: all warnings being treated as errors
> make[6]: *** [scripts/Makefile.build:287:
> drivers/gpu/drm/tests/drm_exec_test.o] Error 1
> make[6]: *** Waiting for unfinished jobs....
>
> In order to fix this, allocate the GEM objects in test_prepare_array()
> with kzalloc(), rather than placing them on the stack.
>
> Cc: Alice Ryhl <[email protected]>
> Cc: Christian König <[email protected]>
> Fixes: e7fa80e2932c ("drm_gem: add mutex to drm_gem_object.gpuva")
> Signed-off-by: Danilo Krummrich <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>