Skip to content

Commit 3f46d1d

Browse files
alexdeuchergregkh
authored andcommitted
drm/amdgpu/userq: fix error handling of invalid doorbell
commit c767d74 upstream. If the doorbell is invalid, be sure to set the r to an error state so the function returns an error. Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 7e2a5b0) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6c3f9d0 commit 3f46d1d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args)
426426
if (index == (uint64_t)-EINVAL) {
427427
drm_file_err(uq_mgr->file, "Failed to get doorbell for queue\n");
428428
kfree(queue);
429+
r = -EINVAL;
429430
goto unlock;
430431
}
431432

0 commit comments

Comments
 (0)