Commit 6c6ca71
drm/amdgpu: fix a race in kfd_mem_export_dmabuf()
Using drm_gem_prime_handle_to_fd() to set dmabuf up and insert it into
descriptor table, only to have it looked up by file descriptor and
remove it from descriptor table is not just too convoluted - it's
racy; another thread might have modified the descriptor table while
we'd been going through that song and dance.
Switch kfd_mem_export_dmabuf() to using drm_gem_prime_handle_to_dmabuf()
and leave the descriptor table alone...
Reviewed-by: Felix Kuehling <[email protected]>
Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>1 parent b2d4da3 commit 6c6ca71
1 file changed
+3
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
818 | 817 | | |
819 | 818 | | |
820 | 819 | | |
821 | | - | |
822 | 820 | | |
823 | 821 | | |
824 | | - | |
| 822 | + | |
825 | 823 | | |
826 | 824 | | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | | - | |
| 825 | + | |
| 826 | + | |
833 | 827 | | |
834 | 828 | | |
835 | 829 | | |
| |||
0 commit comments