drm/amdgpu: Use list_del_init in amdgpu_mn_unregister
Subsystems (2)
PATCH 1/1 drm/amdgpu: Use list_del_init in amdgpu_mn_unregister
Otherwise bo->shadow_list (which is aliased by bo->mn_list) will not appear empty in amdgpu_ttm_bo_destroy and cause an oops when freeing former userptr BOs.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c +1 -1
@@ -359,7 +359,7 @@ void amdgpu_mn_unregister(struct amdgpu_bo *bo) head = bo->mn_list.next; bo->mn =NULL ; -list_del (&bo->mn_list); +list_del_init (&bo->mn_list);if (list_empty (head)) {struct amdgpu_mn_node *node;
Signature · 6 lines
1.9.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): 1501641295-26353-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org
Hi Christian,
Please apply this patch if you think this is the correct solution. This is currently blocking the amd-kfd-staging merge from amd-staging-4.11. Kent will try another merge tomorrow morning our time.
I'm quite sure this also breaks userptrs in the graphics driver.
Thanks,
Felix
Quoted 14 lines · Felix Kuehling
Otherwise
bo->shadow_list(which is aliased bybo->mn_list) will not appear empty inamdgpu_ttm_bo_destroyand cause an oops when freeing former userptr BOs.Signed-off-by Felix Kuehling <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c void amdgpu_mn_unregister(struct amdgpu_bo *bo) · line 365
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c +1
-1@@ -359,7 +359,7 @@ void amdgpu_mn_unregister(struct amdgpu_bo *bo) head = bo->mn_list.next; bo->mn =NULL ; -list_del (&bo->mn_list); +list_del_init (&bo->mn_list);if (list_empty (head)) {struct amdgpu_mn_node *node;
_______________________________________________
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): d69ea54c-0e44-9112-1b7a-a304f81ccee8-5C7GfCeVMHo@public.gmane.org
Hi Felix,
yeah, that looks like the correct solution.
Patch is Reviewed-by: Christian König <[email protected]> and I'm going to push it into amd-staging-4.11 ASAP.
Mpf, looks like I've actually tested this with the notifier disabled.
Thanks for the quick fix,
Christian.
Am 02.08.2017 um 04:41 schrieb Felix Kuehling:
Quoted 33 lines
Hi Christian,
Please apply this patch if you think this is the correct solution. This is currently blocking the amd-kfd-staging merge from amd-staging-4.11. Kent will try another merge tomorrow morning our time.
I'm quite sure this also breaks userptrs in the graphics driver.
Thanks,
FelixQuoted 20 lines · Felix Kuehling
Otherwise
bo->shadow_list(which is aliased bybo->mn_list) will not appear empty inamdgpu_ttm_bo_destroyand cause an oops when freeing former userptr BOs.Signed-off-by Felix Kuehling <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c +1
-1@@ -359,7 +359,7 @@ void amdgpu_mn_unregister(struct amdgpu_bo *bo) head = bo->mn_list.next; bo->mn =NULL ; -list_del (&bo->mn_list); +list_del_init (&bo->mn_list);
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c void amdgpu_mn_unregister(struct amdgpu_bo *bo) · line 365
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c +0
-0if (list_empty (head)) {struct amdgpu_mn_node *node;_______________________________________________
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
A message that is not in the archive (sent off-list or not yet received): 59789614-b4c6-447c-4f8d-4b5527fe1a4c-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Things look good on initial testing on Fiji. Thanks Felix for the fix, and Christian for pushing it quickly.
Kent
-----Original Message-----
From: Christian König [mailto:[email protected]]
Sent: Wednesday, August 02, 2017 3:01 AM
To: Kuehling, Felix; [email protected]; Koenig, Christian
Cc: Russell, Kent
Subject: Re: [PATCH 1/1] drm/amdgpu: Use list_del_init in amdgpu_mn_unregister
Hi Felix,
yeah, that looks like the correct solution.
Patch is Reviewed-by: Christian König <[email protected]> and I'm going to push it into amd-staging-4.11 ASAP.
Mpf, looks like I've actually tested this with the notifier disabled.
Thanks for the quick fix,
Christian.
Am 02.08.2017 um 04:41 schrieb Felix Kuehling:
Quoted 34 lines
Hi Christian,
Please apply this patch if you think this is the correct solution. This is currently blocking the amd-kfd-staging merge from amd-staging-4.11. Kent will try another merge tomorrow morning our time.
I'm quite sure this also breaks userptrs in the graphics driver.
Thanks,
FelixQuoted 21 lines · Felix Kuehling
Otherwise
bo->shadow_list(which is aliased bybo->mn_list) will not appear empty inamdgpu_ttm_bo_destroyand cause an oops when freeing former userptr BOs.Signed-off-by Felix Kuehling <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c +1
-1@@ -359,7 +359,7 @@ void amdgpu_mn_unregister(struct amdgpu_bo *bo) head = bo->mn_list.next; bo->mn =NULL ; -list_del (&bo->mn_list); +list_del_init (&bo->mn_list);
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c void amdgpu_mn_unregister(struct amdgpu_bo *bo) · line 365
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c +0
-0if (list_empty (head)) {struct amdgpu_mn_node *node;_______________________________________________
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