Re: [PATCH] drm/amdgpu: fix amdgpu_vm_fini

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2018年10月18日 20:31, Christian König wrote:
We should not remove mappings in rbtree_postorder_for_each_entry_safe
because that rebalances the tree.

Signed-off-by: Christian König <christian.koenig@xxxxxxx>
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 -
  1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 6904d794d60a..01d94de6a6a1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -3235,7 +3235,6 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm)
  	rbtree_postorder_for_each_entry_safe(mapping, tmp,
  					     &vm->va.rb_root, rb) {
  		list_del(&mapping->list);
-		amdgpu_vm_it_remove(mapping, &vm->va);
  		kfree(mapping);
At least, we should add some comments here, like rb_root would be invalid, we cannot use it any more, although that is fact.
Or as you suggested to me before, we can change to while(next_node)...:)

anyway, depending on your favorite, Reviewed-by: Chunming Zhou <david1.zhou@xxxxxxx>
  	}
  	list_for_each_entry_safe(mapping, tmp, &vm->freed, list) {

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux