diff options
author | Christian König <christian.koenig@amd.com> | 2023-11-09 10:12:39 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-11-28 16:46:36 +0000 |
commit | b952a09c78174091a12726999d37e676918a6ec7 (patch) | |
tree | b330f5aaedf0f5d94f34e8686e524d7482221a74 /drivers/gpu/drm/amd | |
parent | e9cafc688b8f13a0bd67d928e13f0b4fb96d312a (diff) | |
download | linux-stable-b952a09c78174091a12726999d37e676918a6ec7.tar.gz linux-stable-b952a09c78174091a12726999d37e676918a6ec7.tar.bz2 linux-stable-b952a09c78174091a12726999d37e676918a6ec7.zip |
drm/amdgpu: fix error handling in amdgpu_bo_list_get()
commit 12f76050d8d4d10dab96333656b821bd4620d103 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>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c index fda8d68a87fd..b9a94c431f09 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c @@ -168,6 +168,7 @@ int amdgpu_bo_list_get(struct amdgpu_fpriv *fpriv, int id, } rcu_read_unlock(); + *result = NULL; return -ENOENT; } |