]> www.infradead.org Git - linux-platform-drivers-x86.git/commit
drm/amdgpu: switch kzalloc to kvzalloc in amdgpu_bo_create
authorChangfeng <Changfeng.Zhu@amd.com>
Wed, 2 Jun 2021 13:25:56 +0000 (21:25 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Jun 2021 18:01:56 +0000 (14:01 -0400)
commit2a48b5911cf2e111a271bffbe5cac443231a4384
tree1b4c9227209c9e4e4f8eadf8a4e0a3ac52537852
parent614124bea77e452aa6df7a8714e8bc820b489922
drm/amdgpu: switch kzalloc to kvzalloc in amdgpu_bo_create

It will cause error when alloc memory larger than 128KB in
amdgpu_bo_create->kzalloc. So it needs to switch kzalloc to kvzalloc.

Call Trace:
   alloc_pages_current+0x6a/0xe0
   kmalloc_order+0x32/0xb0
   kmalloc_order_trace+0x1e/0x80
   __kmalloc+0x249/0x2d0
   amdgpu_bo_create+0x102/0x500 [amdgpu]
   ? xas_create+0x264/0x3e0
   amdgpu_bo_create_vm+0x32/0x60 [amdgpu]
   amdgpu_vm_pt_create+0xf5/0x260 [amdgpu]
   amdgpu_vm_init+0x1fd/0x4d0 [amdgpu]

Signed-off-by: Changfeng <Changfeng.Zhu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c