drm/amdgpu: Free user pages if amdgpu_cs_parser_bos failed
authorPhilip Yang <Philip.Yang@amd.com>
Wed, 27 Apr 2022 22:50:49 +0000 (18:50 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 Apr 2022 21:49:04 +0000 (17:49 -0400)
commit3da2c38231a4c62dafdbd762a199cfacaccd0533
tree2c88432664a23171dcc1afd6d9773c70533cd176
parent86e18ac3aee9d0a3deadb6dc0a8685621805ceed
drm/amdgpu: Free user pages if amdgpu_cs_parser_bos failed

Otherwise userspace resubmit the BOs again will trigger kernel WARNING
and fail the command submission.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Tested-by: Robert Święcki <robert@swiecki.net>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c