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.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Felix Kuehling 2017-08-01 22:34:55 -04:00 committed by Alex Deucher
parent 5694785cf0
commit 68c9793d63
1 changed files with 1 additions and 1 deletions

View File

@ -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;