From: jsg Date: Thu, 19 Jan 2023 00:01:58 +0000 (+0000) Subject: drm/amdgpu: Fixed bug on error when unloading amdgpu X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=dcffe995a02b03e457ee6591c375c6b1f65b22a9;p=openbsd drm/amdgpu: Fixed bug on error when unloading amdgpu From YiPeng Chai 9196eb7c52e55749a332974f0081f77d53d60199 in linux-6.1.y/6.1.7 99f1a36c90a7524972be5a028424c57fa17753ee in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_vram_mgr.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_vram_mgr.c index a8b46214a6a..c8607247e1f 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_vram_mgr.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_vram_mgr.c @@ -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);