drm/amdgpu: fix error handling in amdgpu_bo_list_create
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix error handling in amdgpu_bo_list_create
We need to drop normal and userptr BOs separately.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c +6 -1
@@ -139,7 +139,12 @@ int amdgpu_bo_list_create(struct amdgpu_device *adev, struct drm_file *filp,return 0 ; error_free: -while (i--) { +for (i =0 ; i < last_entry; ++i) { +struct amdgpu_bo *bo =ttm_to_amdgpu_bo (array[i].tv.bo); + +amdgpu_bo_unref (&bo); + } +for (i = first_userptr; i < num_entries; ++i) {struct amdgpu_bo *bo =ttm_to_amdgpu_bo (array[i].tv.bo);amdgpu_bo_unref (&bo);
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20190918174308.107845-1-christian.koenig-5C7GfCeVMHo@public.gmane.org
Ping? Can I get at least and acked-by for this?
Thanks,
Christian.
Am 18.09.19 um 19:43 schrieb Christian König:
Quoted 15 lines
We need to drop normal and userptr BOs separately.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c +0
-0@@ -139,7 +139,12 @@ int amdgpu_bo_list_create(struct amdgpu_device *adev, struct drm_file *filp,return 0 ; error_free:
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c int amdgpu_bo_list_create(struct amdgpu_device *adev, struct drm_file *filp, · line 150
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c +6
-1-while (i--) { +for (i =0 ; i < last_entry; ++i) { +struct amdgpu_bo *bo =ttm_to_amdgpu_bo (array[i].tv.bo); + +amdgpu_bo_unref (&bo); + } +for (i = first_userptr; i < num_entries; ++i) {struct amdgpu_bo *bo =ttm_to_amdgpu_bo (array[i].tv.bo);amdgpu_bo_unref (&bo);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Huang, Ray
Acked-by Huang RuiQuoted 10 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Christian K?nig
Sent: Thursday, September 19, 2019 1:43 AM
To: [email protected]
Subject: [PATCH] drm/amdgpu: fix error handling inamdgpu_bo_list_createWe need to drop normal and userptr BOs separately.
Signed-off-by Christian König <[email protected]>
Quoted 27 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c +6
-1@@ -139,7 +139,12 @@ int amdgpu_bo_list_create(struct amdgpu_device *adev, struct drm_file *filp, return 0; error_free: -while (i--) { +for (i =0 ; i < last_entry; ++i) { +struct amdgpu_bo *bo =ttm_to_amdgpu_bo (array[i].tv.bo); + +amdgpu_bo_unref (&bo); + } +for (i = first_userptr; i < num_entries; ++i) {struct amdgpu_bo *bo =ttm_to_amdgpu_bo (array[i].tv.bo);
amdgpu_bo_unref(&bo);
--
2.17.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx