[Bug 206895] [amdgpu] crash while using opencl from amdgpu-pro on kernel 5.5.10

bugzilla-daemon at bugzilla.kernel.org bugzilla-daemon at bugzilla.kernel.org
Mon Mar 23 00:38:58 UTC 2020


https://bugzilla.kernel.org/show_bug.cgi?id=206895

--- Comment #8 from bigbeeshane at gmail.com ---
After some further validation

5.6-rc6 also has this bug

Reverting be62dbf554c5b50718a54a359372c148cd9975c7 fixes the issue but overall
it seems that amdgpu is not using the new implementation of dma_map_sg
correctly. 

Looking at the documentation (here :
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/DMA-API.txt?h=v5.5.11#n354)
it seems like return value of dma_map_sg and the supplied value for nents can
differ in length.

Currently the amdgpu driver code validates that the return value of dma_map_sg
and nents are equal, otherwise bailing out of amdgpu_ttm_tt_pin_userptr see
line :

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c?h=v5.5.11#n976

This would explain the "*ERROR* failed to pin userptr" message followed by the
trace.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the dri-devel mailing list