Philip Yang
9fb1674152
drm/amdgpu: prevent double kfree ttm->sg
[ Upstream commit 1d0e16ac1a ]
Set ttm->sg to NULL after kfree, to avoid memory corruption backtrace:
[ 420.932812] kernel BUG at
/build/linux-do9eLF/linux-4.15.0/mm/slub.c:295!
[ 420.934182] invalid opcode: 0000 [#1] SMP NOPTI
[ 420.935445] Modules linked in: xt_conntrack ipt_MASQUERADE
[ 420.951332] Hardware name: Dell Inc. PowerEdge R7525/0PYVT1, BIOS
1.5.4 07/09/2020
[ 420.952887] RIP: 0010:__slab_free+0x180/0x2d0
[ 420.954419] RSP: 0018:ffffbe426291fa60 EFLAGS: 00010246
[ 420.955963] RAX: ffff9e29263e9c30 RBX: ffff9e29263e9c30 RCX:
000000018100004b
[ 420.957512] RDX: ffff9e29263e9c30 RSI: fffff3d33e98fa40 RDI:
ffff9e297e407a80
[ 420.959055] RBP: ffffbe426291fb00 R08: 0000000000000001 R09:
ffffffffc0d39ade
[ 420.960587] R10: ffffbe426291fb20 R11: ffff9e49ffdd4000 R12:
ffff9e297e407a80
[ 420.962105] R13: fffff3d33e98fa40 R14: ffff9e29263e9c30 R15:
ffff9e2954464fd8
[ 420.963611] FS: 00007fa2ea097780(0000) GS:ffff9e297e840000(0000)
knlGS:0000000000000000
[ 420.965144] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 420.966663] CR2: 00007f16bfffefb8 CR3: 0000001ff0c62000 CR4:
0000000000340ee0
[ 420.968193] Call Trace:
[ 420.969703] ? __page_cache_release+0x3c/0x220
[ 420.971294] ? amdgpu_ttm_tt_unpopulate+0x5e/0x80 [amdgpu]
[ 420.972789] kfree+0x168/0x180
[ 420.974353] ? amdgpu_ttm_tt_set_user_pages+0x64/0xc0 [amdgpu]
[ 420.975850] ? kfree+0x168/0x180
[ 420.977403] amdgpu_ttm_tt_unpopulate+0x5e/0x80 [amdgpu]
[ 420.978888] ttm_tt_unpopulate.part.10+0x53/0x60 [amdttm]
[ 420.980357] ttm_tt_destroy.part.11+0x4f/0x60 [amdttm]
[ 420.981814] ttm_tt_destroy+0x13/0x20 [amdttm]
[ 420.983273] ttm_bo_cleanup_memtype_use+0x36/0x80 [amdttm]
[ 420.984725] ttm_bo_release+0x1c9/0x360 [amdttm]
[ 420.986167] amdttm_bo_put+0x24/0x30 [amdttm]
[ 420.987663] amdgpu_bo_unref+0x1e/0x30 [amdgpu]
[ 420.989165] amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0x9ca/0xb10
[amdgpu]
[ 420.990666] kfd_ioctl_alloc_memory_of_gpu+0xef/0x2c0 [amdgpu]
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@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>
2023-05-16 09:24:19 +09:00
..
2016-11-07 12:40:52 -05:00
2016-05-04 20:20:28 -04:00
2018-03-18 11:18:49 +01:00
2015-06-03 21:03:15 -04:00
2023-05-15 09:01:31 +09:00
2016-09-19 20:58:35 +03:00
2016-09-22 10:24:16 -04:00
2016-02-27 22:52:40 +02:00
2023-05-15 17:09:25 +09:00
2016-08-31 15:21:07 -04:00
2018-04-24 09:34:15 +02:00
2016-08-22 13:47:18 -04:00
2016-07-29 14:36:48 -04:00
2018-04-24 09:34:15 +02:00
2016-10-28 15:26:51 -04:00
2023-05-16 08:56:47 +09:00
2015-06-03 21:03:15 -04:00
2018-04-24 09:34:15 +02:00
2016-10-12 15:44:14 -04:00
2018-03-24 11:00:18 +01:00
2023-05-16 09:23:33 +09:00
2016-10-13 18:25:48 -04:00
2015-06-03 21:03:15 -04:00
2023-05-16 08:56:44 +09:00
2015-08-17 16:50:21 -04:00
2015-06-03 21:03:15 -04:00
2016-09-30 13:21:02 +10:00
2016-10-24 17:01:22 -04:00
2016-09-30 13:21:02 +10:00
2016-08-19 12:30:58 -04:00
2018-03-22 09:18:00 +01:00
2016-07-07 14:54:44 -04:00
2016-07-07 14:54:44 -04:00
2016-09-28 16:16:23 -04:00
2016-10-06 12:39:03 -04:00
2016-09-27 13:00:52 -04:00
2016-09-28 12:08:49 +10:00
2016-09-14 15:10:27 -04:00
2015-08-17 16:50:09 -04:00
2015-06-03 21:03:15 -04:00
2016-10-24 16:59:55 -04:00
2016-08-08 11:32:10 -04:00
2016-09-14 15:10:37 -04:00
2023-05-16 08:56:43 +09:00
2016-05-23 17:04:14 -07:00
2016-08-10 14:28:06 -04:00
2018-03-22 09:18:00 +01:00
2016-09-14 15:10:44 -04:00
2016-09-14 15:10:37 -04:00
2015-06-03 21:03:15 -04:00
2016-09-22 10:24:16 -04:00
2015-06-03 21:03:15 -04:00
2016-10-04 11:15:59 -04:00
2015-12-21 16:42:07 -05:00
2016-11-11 10:20:04 -05:00
2016-10-13 18:25:50 -04:00
2016-07-02 15:56:01 +10:00
2016-07-07 14:51:23 -04:00
2016-08-22 13:47:18 -04:00
2015-06-03 21:03:15 -04:00
2016-09-28 16:16:26 -04:00
2023-05-16 09:24:19 +09:00
2016-09-28 16:16:19 -04:00
2016-10-04 11:16:00 -04:00
2015-06-03 21:03:15 -04:00
2018-03-18 11:18:49 +01:00
2016-07-29 14:37:04 -04:00
2017-12-05 11:24:34 +01:00
2016-09-16 15:53:01 -04:00
2016-09-22 10:24:20 -04:00
2017-12-05 11:24:34 +01:00
2016-12-07 11:17:21 -05:00
2023-05-16 09:15:46 +09:00
2016-05-11 12:31:20 -04:00
2017-06-29 13:00:30 +02:00
2016-05-04 20:23:53 -04:00
2016-08-08 13:28:39 -04:00
2015-06-03 21:03:15 -04:00
2016-07-14 16:46:06 -04:00
2015-06-03 21:03:15 -04:00
2016-09-14 15:10:37 -04:00
2016-07-14 16:39:35 -04:00
2017-06-14 15:05:55 +02:00
2016-07-07 14:50:49 -04:00
2015-06-03 21:03:17 -04:00
2015-06-03 21:03:51 -04:00
2016-05-18 09:21:52 -04:00
2015-06-03 21:03:51 -04:00
2016-09-28 12:08:49 +10:00
2015-06-03 21:03:51 -04:00
2016-09-19 14:45:52 -04:00
2015-06-03 21:03:51 -04:00
2016-09-19 14:38:25 -04:00
2015-06-03 21:03:17 -04:00
2015-06-03 21:03:12 -04:00
2015-06-03 21:03:17 -04:00
2016-10-14 11:52:29 -04:00
2016-01-13 12:12:43 -05:00
2016-05-18 09:22:12 -04:00
2015-06-03 21:03:51 -04:00
2016-09-22 10:24:16 -04:00
2016-05-11 12:31:20 -04:00
2017-06-24 07:11:13 +02:00
2016-08-31 12:10:19 -04:00
2017-06-24 07:11:13 +02:00
2016-08-08 14:04:37 -04:00
2017-06-24 07:11:13 +02:00
2016-08-08 14:04:37 -04:00
2017-06-24 07:11:13 +02:00
2016-08-08 14:04:37 -04:00
2017-12-09 22:01:53 +01:00
2016-08-08 14:07:18 -04:00
2016-09-19 14:38:24 -04:00
2016-08-31 12:10:50 -04:00
2018-03-18 11:18:49 +01:00
2016-07-07 15:01:58 -04:00
2023-05-15 08:29:58 +09:00
2016-08-08 11:32:58 -04:00
2017-02-09 08:08:26 +01:00
2016-08-31 12:10:18 -04:00
2016-08-23 13:48:04 -04:00
2016-07-07 14:54:50 -04:00
2016-10-21 11:18:37 -04:00
2016-07-07 14:54:50 -04:00
2016-05-18 09:22:17 -04:00
2015-06-03 21:03:51 -04:00
2015-09-02 12:21:35 -04:00
2016-10-04 11:15:59 -04:00
2023-05-15 08:29:59 +09:00
2015-06-03 21:03:17 -04:00
2015-06-03 21:03:17 -04:00
2016-10-04 11:15:59 -04:00
2016-08-08 13:44:11 -04:00
2016-07-15 12:33:31 -04:00
2016-08-31 15:21:09 -04:00
2016-09-28 12:08:49 +10:00
2015-06-03 21:03:51 -04:00
2016-10-14 11:51:04 -04:00
2015-06-03 21:03:51 -04:00
2016-09-16 15:52:57 -04:00
2016-08-31 12:10:51 -04:00
2023-05-15 08:29:59 +09:00
2016-08-31 15:21:09 -04:00
2016-09-12 18:12:22 -04:00
2016-08-31 12:10:19 -04:00
2016-09-14 15:10:40 -04:00
2023-05-15 14:41:00 +09:00
2016-08-31 12:11:19 -04:00
2016-09-28 16:13:17 -04:00
2016-05-04 20:26:26 -04:00
2016-10-14 11:51:04 -04:00
2015-06-03 21:03:51 -04:00
2015-09-02 12:21:35 -04:00
2016-09-16 15:53:00 -04:00
2015-06-03 21:03:51 -04:00
2016-09-16 15:53:00 -04:00
2015-06-03 21:03:51 -04:00
2017-11-08 10:08:32 +01:00
2015-06-03 21:03:51 -04:00
2016-09-16 15:53:02 -04:00
2015-06-03 21:03:51 -04:00
2017-12-09 22:01:52 +01:00
2015-06-03 21:03:51 -04:00
2015-08-17 16:50:26 -04:00
2016-10-28 15:26:51 -04:00
2015-06-03 21:03:51 -04:00
2016-09-19 14:38:25 -04:00