xinhui pan
0707c3fea8
drm/amdgpu: Fix a use-after-free
[ Upstream commit 1e5c37385097c35911b0f8a0c67ffd10ee1af9a2 ]
looks like we forget to set ttm->sg to NULL.
Hit panic below
[ 1235.844104] general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b7b4b: 0000 [#1] SMP DEBUG_PAGEALLOC NOPTI
[ 1235.989074] Call Trace:
[ 1235.991751] sg_free_table+0x17/0x20
[ 1235.995667] amdgpu_ttm_backend_unbind.cold+0x4d/0xf7 [amdgpu]
[ 1236.002288] amdgpu_ttm_backend_destroy+0x29/0x130 [amdgpu]
[ 1236.008464] ttm_tt_destroy+0x1e/0x30 [ttm]
[ 1236.013066] ttm_bo_cleanup_memtype_use+0x51/0xa0 [ttm]
[ 1236.018783] ttm_bo_release+0x262/0xa50 [ttm]
[ 1236.023547] ttm_bo_put+0x82/0xd0 [ttm]
[ 1236.027766] amdgpu_bo_unref+0x26/0x50 [amdgpu]
[ 1236.032809] amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0x7aa/0xd90 [amdgpu]
[ 1236.040400] kfd_ioctl_alloc_memory_of_gpu+0xe2/0x330 [amdgpu]
[ 1236.046912] kfd_ioctl+0x463/0x690 [amdgpu]
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-06-03 08:22:08 +02:00
..
2018-03-18 11:17:49 +01:00
2015-06-03 21:03:15 -04:00
2015-06-03 21:03:15 -04:00
2018-10-20 09:52:33 +02:00
2015-10-14 16:16:36 -04:00
2015-09-23 17:23:34 -04:00
2015-07-20 09:16:48 +03:00
2020-03-20 09:06:22 +01:00
2015-06-03 21:03:15 -04:00
2016-08-20 18:09:22 +02:00
2015-09-23 17:23:34 -04:00
2015-10-14 16:16:38 -04:00
2016-11-26 09:54:52 +01:00
2015-09-30 12:44:16 -04:00
2020-09-03 11:19:23 +02:00
2015-06-03 21:03:15 -04:00
2017-07-05 14:37:19 +02:00
2015-11-03 11:15:19 -05:00
2018-02-28 10:17:23 +01:00
2020-10-14 09:46:20 +02:00
2016-10-31 04:13:57 -06:00
2015-06-03 21:03:15 -04:00
2020-09-03 11:19:23 +02:00
2015-08-17 16:50:21 -04:00
2015-06-03 21:03:15 -04:00
2015-11-05 10:57:25 +10:00
2015-11-16 11:05:50 -05:00
2016-09-07 08:32:42 +02:00
2015-06-03 21:03:15 -04:00
2015-12-09 00:18:33 -05:00
2015-06-03 21:03:15 -04:00
2015-06-03 21:03:15 -04:00
2015-06-03 21:03:15 -04:00
2015-06-03 21:03:15 -04:00
2016-09-07 08:32:42 +02:00
2015-09-23 17:23:34 -04:00
2015-08-17 16:50:09 -04:00
2015-06-03 21:03:15 -04:00
2017-03-26 12:13:18 +02:00
2015-08-17 16:50:09 -04:00
2020-09-03 11:19:23 +02:00
2016-03-03 15:07:19 -08:00
2016-05-04 14:48:46 -07:00
2018-09-09 20:04:36 +02:00
2015-11-16 17:01:32 -05:00
2015-06-03 21:03:15 -04:00
2015-06-03 21:03:15 -04:00
2016-03-09 15:34:51 -08:00
2015-06-03 21:03:15 -04:00
2016-11-26 09:54:52 +01:00
2015-10-30 01:54:07 -04:00
2016-03-03 15:07:19 -08:00
2015-11-16 11:05:58 -05:00
2015-11-16 17:01:32 -05:00
2016-03-03 15:07:18 -08:00
2015-09-23 17:23:34 -04:00
2015-06-03 21:03:15 -04:00
2015-11-16 11:05:57 -05:00
2021-06-03 08:22:08 +02:00
2015-09-23 17:23:34 -04:00
2015-06-03 21:03:15 -04:00
2016-05-04 14:48:46 -07:00
2015-08-17 16:50:51 -04:00
2017-11-08 10:06:29 +01:00
2015-08-17 16:50:52 -04:00
2016-03-09 15:34:56 -08:00
2016-11-26 09:54:52 +01:00
2020-10-01 11:11:53 +02:00
2015-10-14 16:16:24 -04:00
2017-06-29 12:48:52 +02:00
2015-06-03 21:03:15 -04:00
2016-11-15 07:46:40 +01:00
2015-06-03 21:03:15 -04:00
2016-08-20 18:09:22 +02:00
2015-06-03 21:03:15 -04:00
2015-06-03 21:03:15 -04:00
2015-06-03 21:03:15 -04:00
2017-06-14 13:16:21 +02:00
2015-06-03 21:03:17 -04:00
2015-06-03 21:03:17 -04:00
2015-06-03 21:03:51 -04:00
2015-06-03 21:03:51 -04:00
2015-06-03 21:03:51 -04:00
2020-11-18 18:24:59 +01:00
2015-06-03 21:03:51 -04:00
2015-10-06 10:43:16 -04:00
2015-06-03 21:03:51 -04:00
2015-09-02 12:21:35 -04:00
2015-06-03 21:03:17 -04:00
2015-06-03 21:03:17 -04:00
2016-09-15 08:27:50 +02:00
2015-06-29 11:21:52 -04:00
2015-06-03 21:03:51 -04:00
2015-06-03 21:03:51 -04:00
2015-06-03 21:03:17 -04:00
2015-10-21 12:19:46 -04:00
2015-06-03 21:03:17 -04:00
2017-05-25 14:30:10 +02:00
2015-06-03 21:03:51 -04:00
2017-05-25 14:30:10 +02:00
2015-06-03 21:03:51 -04:00
2017-05-25 14:30:10 +02:00
2015-06-03 21:03:51 -04:00
2015-08-17 16:50:26 -04:00
2015-08-17 16:50:26 -04:00
2015-09-23 17:23:34 -04:00
2015-08-17 16:50:26 -04:00
2018-03-18 11:17:49 +01:00
2015-06-03 21:03:51 -04:00
2016-03-09 15:34:51 -08:00
2015-06-03 21:03:51 -04:00
2016-08-20 18:09:22 +02:00
2015-06-03 21:03:51 -04:00
2016-04-20 15:41:56 +09:00
2015-06-03 21:03:51 -04:00
2015-06-10 09:32:25 -04:00
2015-06-03 21:03:51 -04:00
2015-06-03 21:03:51 -04:00
2015-09-02 12:21:35 -04:00
2016-03-03 15:07:19 -08:00
2015-06-03 21:03:17 -04:00
2015-06-03 21:03:15 -04:00
2017-05-02 21:19:48 -07:00
2015-06-03 21:03:17 -04:00
2015-06-03 21:03:17 -04:00
2016-03-03 15:07:19 -08:00
2015-06-03 21:03:13 -04:00
2016-04-12 09:08:59 -07:00
2015-06-03 21:03:51 -04:00
2015-10-21 12:20:20 -04:00
2015-06-03 21:03:51 -04:00
2015-06-03 21:03:17 -04:00
2015-06-03 21:03:17 -04:00
2015-06-03 21:03:17 -04:00
2015-06-03 21:03:17 -04:00
2015-06-03 21:03:17 -04:00
2015-06-03 21:03:17 -04:00
2015-06-03 21:03:17 -04:00
2016-03-03 15:07:18 -08:00
2015-06-03 21:03:51 -04:00
2015-06-03 21:03:51 -04:00
2015-06-03 21:03:17 -04:00
2015-09-02 12:21:35 -04:00
2015-09-23 17:23:34 -04:00
2015-06-03 21:03:17 -04:00
2015-10-21 11:35:12 -04:00
2015-06-03 21:03:51 -04:00
2015-10-21 11:35:12 -04:00
2015-06-03 21:03:51 -04:00
2015-10-21 11:35:12 -04:00
2015-06-03 21:03:51 -04:00
2015-10-21 11:35:12 -04:00
2015-06-03 21:03:51 -04:00
2015-11-20 18:21:04 -05:00
2015-06-03 21:03:51 -04:00
2015-08-17 16:50:26 -04:00
2016-03-09 15:34:57 -08:00
2015-06-03 21:03:51 -04:00
2015-07-20 09:16:48 +03:00