drm/amdgpu: fix integer overflow test in amdgpu_bo_list_create()
We accidentally left out the size of the amdgpu_bo_list struct. It could lead to memory corruption on 32 bit systems. You'd have to pick the absolute maximum and set "num_entries == 59652323" then size would wrap to 16 bytes. Fixes: 920990cb ("drm/amdgpu: allocate the bo_list array after the list") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NHuang Rui <ray.huang@amd.com> Reviewed-by: NBas Nieuwenhuizen <basni@chromium.org> Signed-off-by: NHuang Rui <ray.huang@amd.com> Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
Showing
想要评论请 注册 或 登录