drm/radeon: Use drm_malloc_ab instead of kmalloc_array
Should avoid kmalloc failures due to large number of array entries. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81991 Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
This commit is contained in:

committed by
Alex Deucher

parent
6fa455935a
commit
e5a5fd4df2
@@ -132,8 +132,8 @@ struct radeon_cs_reloc *radeon_vm_get_bos(struct radeon_device *rdev,
|
||||
struct radeon_cs_reloc *list;
|
||||
unsigned i, idx;
|
||||
|
||||
list = kmalloc_array(vm->max_pde_used + 2,
|
||||
sizeof(struct radeon_cs_reloc), GFP_KERNEL);
|
||||
list = drm_malloc_ab(vm->max_pde_used + 2,
|
||||
sizeof(struct radeon_cs_reloc));
|
||||
if (!list)
|
||||
return NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user