memory leak in `amdgpu_bo_create()`
Submitted by Paul Menzel
Assigned to Default DRI bug account
Link to original bug (#109389)
Description
Created attachment 143156
Output of kmemleak
With Linux 5.0-rc2+ the memory leaks below are reported by kmemleak.
unreferenced object 0xffff9f83850c5000 (size 2048):<br>
comm "gnome-shell", pid 569, jiffies 4294682217 (age 9133.583s)<br>
hex dump (first 32 bytes):<br>
02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 ................<br>
02 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 ................<br>
backtrace:<br>
[<000000001aec1dd8>] amdgpu_bo_create+0x40/0x220 [amdgpu]<br>
[<000000007da39c30>] amdgpu_gem_object_create+0x9e/0x120 [amdgpu]<br>
[<00000000099484e9>] amdgpu_gem_create_ioctl+0x1d3/0x290 [amdgpu]<br>
[<000000009d8251d3>] drm_ioctl_kernel+0xa9/0xf0<br>
[<0000000050b61811>] drm_ioctl+0x201/0x3a0<br>
[<000000007c88aae3>] amdgpu_drm_ioctl+0x49/0x80 [amdgpu]<br>
[<0000000083291747>] do_vfs_ioctl+0xa4/0x630<br>
[<00000000722b6176>] ksys_ioctl+0x60/0x90<br>
[<000000001bfa30dc>] __x64_sys_ioctl+0x16/0x20<br>
[<000000007862c966>] do_syscall_64+0x55/0x170<br>
[<00000000a8eeee88>] entry_SYSCALL_64_after_hwframe+0x44/0xa9<br>
[<000000001242345f>] 0xffffffffffffffff<br>
unreferenced object 0xffff9f837cdd36c0 (size 64):<br>
comm "gnome-shell", pid 569, jiffies 4294682217 (age 9133.583s)<br>
hex dump (first 32 bytes):<br>
d4 23 b4 d5 ab e2 45 94 d0 53 43 86 83 9f ff ff .#....E..SC.....<br>
01 00 00 00 04 00 00 00 60 ab cc 5c 83 9f ff ff ........`..\....<br>
backtrace:<br>
[<000000000768e015>] ttm_bo_mem_space+0x41/0x4a0<br>
[<00000000f11076b2>] ttm_bo_validate+0xc7/0x130<br>
[<00000000c820992e>] ttm_bo_init_reserved+0x32f/0x390<br>
[<00000000fcfd5ce2>] amdgpu_bo_do_create+0x1ed/0x420 [amdgpu]<br>
[<000000001aec1dd8>] amdgpu_bo_create+0x40/0x220 [amdgpu]<br>
[<000000007da39c30>] amdgpu_gem_object_create+0x9e/0x120 [amdgpu]<br>
[<00000000099484e9>] amdgpu_gem_create_ioctl+0x1d3/0x290 [amdgpu]<br>
[<000000009d8251d3>] drm_ioctl_kernel+0xa9/0xf0<br>
[<0000000050b61811>] drm_ioctl+0x201/0x3a0<br>
[<000000007c88aae3>] amdgpu_drm_ioctl+0x49/0x80 [amdgpu]<br>
[<0000000083291747>] do_vfs_ioctl+0xa4/0x630<br>
[<00000000722b6176>] ksys_ioctl+0x60/0x90<br>
[<000000001bfa30dc>] __x64_sys_ioctl+0x16/0x20<br>
[<000000007862c966>] do_syscall_64+0x55/0x170<br>
[<00000000a8eeee88>] entry_SYSCALL_64_after_hwframe+0x44/0xa9<br>
[<000000001242345f>] 0xffffffffffffffff<br>
```<br>
<br>
**Attachment 143156**, "Output of kmemleak": <br>
[20190118â__kmemleak.txt](/uploads/5a4a528614f9ce4e640ea86e483c503d/20190118â__kmemleak.txt)<br>
### See also
* https://bugzilla.kernel.org/show_bug.cgi?id=202537
* https://bugs.freedesktop.org/show_bug.cgi?id=107899