Skip to content

Commit

Permalink
drm/amdgpu: fix error handling in amdgpu_bo_list_get()
Browse files Browse the repository at this point in the history
commit 12f7605 upstream.

We should not leak the pointer where we couldn't grab the reference
on to the caller because it can be that the error handling still
tries to put the reference then.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
ChristianKoenigAMD authored and gregkh committed Nov 28, 2023
1 parent 7c6574d commit b827ed7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ int amdgpu_bo_list_get(struct amdgpu_fpriv *fpriv, int id,
}

rcu_read_unlock();
*result = NULL;
return -ENOENT;
}

Expand Down

0 comments on commit b827ed7

Please sign in to comment.