]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/amdgpu: Use list_del_init in amdgpu_mn_unregister
authorFelix Kuehling <Felix.Kuehling@amd.com>
Wed, 2 Aug 2017 02:34:55 +0000 (22:34 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Aug 2017 18:29:58 +0000 (14:29 -0400)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c

index 38f739fb727bd2da4c81ad198ae18e46bee8e040..6558a3ed57a7f6a1127f81aa0e1b5a861aa21b8d 100644 (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;