Lang Yu
9c29282ecb
drm/amdkfd: reserve the BO before validating it
...
Fix a warning.
v2: Avoid unmapping attachment repeatedly when ERESTARTSYS.
v3: Lock the BO before accessing ttm->sg to avoid race conditions.(Felix)
[ 41.708711] WARNING: CPU: 0 PID: 1463 at drivers/gpu/drm/ttm/ttm_bo.c:846 ttm_bo_validate+0x146/0x1b0 [ttm]
[ 41.708989] Call Trace:
[ 41.708992] <TASK>
[ 41.708996] ? show_regs+0x6c/0x80
[ 41.709000] ? ttm_bo_validate+0x146/0x1b0 [ttm]
[ 41.709008] ? __warn+0x93/0x190
[ 41.709014] ? ttm_bo_validate+0x146/0x1b0 [ttm]
[ 41.709024] ? report_bug+0x1f9/0x210
[ 41.709035] ? handle_bug+0x46/0x80
[ 41.709041] ? exc_invalid_op+0x1d/0x80
[ 41.709048] ? asm_exc_invalid_op+0x1f/0x30
[ 41.709057] ? amdgpu_amdkfd_gpuvm_dmaunmap_mem+0x2c/0x80 [amdgpu]
[ 41.709185] ? ttm_bo_validate+0x146/0x1b0 [ttm]
[ 41.709197] ? amdgpu_amdkfd_gpuvm_dmaunmap_mem+0x2c/0x80 [amdgpu]
[ 41.709337] ? srso_alias_return_thunk+0x5/0x7f
[ 41.709346] kfd_mem_dmaunmap_attachment+0x9e/0x1e0 [amdgpu]
[ 41.709467] amdgpu_amdkfd_gpuvm_dmaunmap_mem+0x56/0x80 [amdgpu]
[ 41.709586] kfd_ioctl_unmap_memory_from_gpu+0x1b7/0x300 [amdgpu]
[ 41.709710] kfd_ioctl+0x1ec/0x650 [amdgpu]
[ 41.709822] ? __pfx_kfd_ioctl_unmap_memory_from_gpu+0x10/0x10 [amdgpu]
[ 41.709945] ? srso_alias_return_thunk+0x5/0x7f
[ 41.709949] ? tomoyo_file_ioctl+0x20/0x30
[ 41.709959] __x64_sys_ioctl+0x9c/0xd0
[ 41.709967] do_syscall_64+0x3f/0x90
[ 41.709973] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
Fixes: 101b8104307e ("drm/amdkfd: Move dma unmapping after TLB flush")
Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2024-01-31 17:37:53 -05:00
..
2023-06-09 12:36:01 -04:00
2024-01-31 17:22:16 -05:00
2024-01-31 17:22:16 -05:00
2024-01-31 17:22:16 -05:00
2023-08-11 14:47:25 -04:00
2024-01-31 17:37:53 -05:00
2023-11-03 11:59:51 -04:00
2023-09-11 18:17:20 -04:00
2023-07-27 14:59:29 -04:00
2023-07-27 14:59:29 -04:00
2023-06-09 09:42:27 -04:00
2023-08-11 14:47:25 -04:00
2023-08-11 14:47:25 -04:00
2023-08-11 14:47:39 -04:00
2023-08-11 14:47:25 -04:00
2023-10-09 17:02:34 -04:00
2023-08-11 14:47:39 -04:00
2023-09-20 12:23:28 -04:00
2023-10-09 17:02:34 -04:00
2023-11-29 16:24:43 -05:00
2023-06-15 11:37:55 -04:00
2024-01-05 16:10:44 -05:00
2023-08-31 18:10:28 -04:00
2023-08-30 15:51:16 -04:00
2023-08-30 15:51:16 -04:00
2023-06-09 09:42:27 -04:00
2023-06-09 09:42:27 -04:00
2023-06-09 09:42:27 -04:00
2024-01-31 17:21:32 -05:00
2023-12-06 15:22:32 -05:00
2023-03-15 18:45:26 -04:00
2023-09-11 18:17:27 -04:00
2023-09-11 18:17:27 -04:00
2024-01-25 15:48:51 -05:00
2024-01-25 15:48:57 -05:00
2023-09-11 18:17:27 -04:00
2023-10-03 15:41:13 -04:00
2023-09-11 18:17:27 -04:00
2023-09-20 12:23:28 -04:00
2023-06-09 12:35:31 -04:00
2023-06-09 12:35:31 -04:00
2023-06-09 12:35:36 -04:00
2024-01-31 17:22:48 -05:00
2023-12-15 12:15:13 -05:00
2024-01-09 15:44:13 -05:00
2023-06-09 09:46:31 -04:00
2023-06-09 09:46:31 -04:00
2024-01-15 18:33:00 -05:00
2023-12-06 15:22:32 -05:00
2024-01-05 16:10:43 -05:00
2023-09-11 18:17:20 -04:00
2023-08-11 14:47:25 -04:00
2023-06-30 13:11:35 -04:00