drm/amdgpu: Fixed bug on error when unloading amdgpu
authorjsg <jsg@openbsd.org>
Thu, 19 Jan 2023 00:01:58 +0000 (00:01 +0000)
committerjsg <jsg@openbsd.org>
Thu, 19 Jan 2023 00:01:58 +0000 (00:01 +0000)
From YiPeng Chai
9196eb7c52e55749a332974f0081f77d53d60199 in linux-6.1.y/6.1.7
99f1a36c90a7524972be5a028424c57fa17753ee in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_vram_mgr.c

index a8b4621..c860724 100644 (file)
@@ -889,7 +889,7 @@ void amdgpu_vram_mgr_fini(struct amdgpu_device *adev)
                kfree(rsv);
 
        list_for_each_entry_safe(rsv, temp, &mgr->reserved_pages, blocks) {
-               drm_buddy_free_list(&mgr->mm, &rsv->blocks);
+               drm_buddy_free_list(&mgr->mm, &rsv->allocated);
                kfree(rsv);
        }
        drm_buddy_fini(&mgr->mm);