]> git.baikalelectronics.ru Git - kernel.git/commit
drm/radeon: Use kvmalloc for CS chunks
authorChen Li <chenli@uniontech.com>
Tue, 2 Mar 2021 06:42:12 +0000 (14:42 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 2 Mar 2021 19:31:57 +0000 (14:31 -0500)
commit0e5fb5a51a6bc78689b86eb700b80b9c4bd67664
tree9906880792b416b5cadd289f52e6b3a1532b6fab
parent2663244ccaf82cf242a0bdbdfeb5c59208207ec6
drm/radeon: Use kvmalloc for CS chunks

The number of chunks/chunks_array may be passed in
by userspace and can be large.

It has been observed to cause kcalloc failures from trinity fuzzy test:

 WARNING: CPU: 0 PID: 5487 at mm/page_alloc.c:4385
 __alloc_pages_nodemask+0x2d8/0x14d0

Obviously, the required order in this case is larger than MAX_ORDER.
So, just use kvmalloc instead.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Chen Li <chenli@uniontech.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_cs.c