diff options
| author | Danilo Krummrich <dakr@kernel.org> | 2025-08-29 10:55:39 +0300 | 
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2025-08-29 18:42:20 +0300 | 
| commit | 9ca595f501e48cec41c6c56becda6468a409b8ba (patch) | |
| tree | a1fc6ddb54dfb687d2230521e2c99763e2d285a6 /drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | |
| parent | 7d9bc9bee2778e2da7147aeb3a81427487598493 (diff) | |
| download | linux-9ca595f501e48cec41c6c56becda6468a409b8ba.tar.xz | |
drm/test: drm_exec: use kzalloc() to allocate GEM objects
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 <aliceryhl@google.com>
Cc: Christian König <christian.koenig@amd.com>
Fixes: e7fa80e2932c ("drm_gem: add mutex to drm_gem_object.gpuva")
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Nirmoy Das <nirmoyd@nvidia.com>
Link: https://lore.kernel.org/r/20250829075633.2306-1-dakr@kernel.org
[ Use kunit_kzalloc() instead of kzalloc(). - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c')
0 files changed, 0 insertions, 0 deletions
