Vitaly Prosyak
53b2393eeb
drm/amdgpu: fix software pci_unplug on some chips
[ Upstream commit 4638e0c29a3f2294d5de0d052a4b8c9f33ccb957 ]
When software 'pci unplug' using IGT is executed we got a sysfs directory
entry is NULL for differant ras blocks like hdp, umc, etc.
Before call 'sysfs_remove_file_from_group' and 'sysfs_remove_group'
check that 'sd' is not NULL.
[ +0.000001] RIP: 0010:sysfs_remove_group+0x83/0x90
[ +0.000002] Code: 31 c0 31 d2 31 f6 31 ff e9 9a a8 b4 00 4c 89 e7 e8 f2 a2 ff ff eb c2 49 8b 55 00 48 8b 33 48 c7 c7 80 65 94 82 e8 cd 82 bb ff <0f> 0b eb cc 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90
[ +0.000001] RSP: 0018:ffffc90002067c90 EFLAGS: 00010246
[ +0.000002] RAX: 0000000000000000 RBX: ffffffff824ea180 RCX: 0000000000000000
[ +0.000001] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[ +0.000001] RBP: ffffc90002067ca8 R08: 0000000000000000 R09: 0000000000000000
[ +0.000001] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[ +0.000001] R13: ffff88810a395f48 R14: ffff888101aab0d0 R15: 0000000000000000
[ +0.000001] FS: 00007f5ddaa43a00(0000) GS:ffff88841e800000(0000) knlGS:0000000000000000
[ +0.000002] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ +0.000001] CR2: 00007f8ffa61ba50 CR3: 0000000106432000 CR4: 0000000000350ef0
[ +0.000001] Call Trace:
[ +0.000001] <TASK>
[ +0.000001] ? show_regs+0x72/0x90
[ +0.000002] ? sysfs_remove_group+0x83/0x90
[ +0.000002] ? __warn+0x8d/0x160
[ +0.000001] ? sysfs_remove_group+0x83/0x90
[ +0.000001] ? report_bug+0x1bb/0x1d0
[ +0.000003] ? handle_bug+0x46/0x90
[ +0.000001] ? exc_invalid_op+0x19/0x80
[ +0.000002] ? asm_exc_invalid_op+0x1b/0x20
[ +0.000003] ? sysfs_remove_group+0x83/0x90
[ +0.000001] dpm_sysfs_remove+0x61/0x70
[ +0.000002] device_del+0xa3/0x3d0
[ +0.000002] ? ktime_get_mono_fast_ns+0x46/0xb0
[ +0.000002] device_unregister+0x18/0x70
[ +0.000001] i2c_del_adapter+0x26d/0x330
[ +0.000002] arcturus_i2c_control_fini+0x25/0x50 [amdgpu]
[ +0.000236] smu_sw_fini+0x38/0x260 [amdgpu]
[ +0.000241] amdgpu_device_fini_sw+0x116/0x670 [amdgpu]
[ +0.000186] ? mutex_lock+0x13/0x50
[ +0.000003] amdgpu_driver_release_kms+0x16/0x40 [amdgpu]
[ +0.000192] drm_minor_release+0x4f/0x80 [drm]
[ +0.000025] drm_release+0xfe/0x150 [drm]
[ +0.000027] __fput+0x9f/0x290
[ +0.000002] ____fput+0xe/0x20
[ +0.000002] task_work_run+0x61/0xa0
[ +0.000002] exit_to_user_mode_prepare+0x150/0x170
[ +0.000002] syscall_exit_to_user_mode+0x2a/0x50
Cc: Hawking Zhang <hawking.zhang@amd.com>
Cc: Luben Tuikov <luben.tuikov@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Reviewed-by: Luben Tuikov <luben.tuikov@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-28 16:54:53 +00:00
..
2023-11-28 16:54:53 +00:00
2023-11-28 16:54:50 +00:00
2023-09-19 12:20:12 +02:00
2020-12-30 11:52:56 +01:00
2023-09-19 12:20:24 +02:00
2020-08-11 11:58:31 +10:00
2023-11-20 11:06:49 +01:00
2023-09-19 12:20:11 +02:00
2023-09-23 11:01:06 +02:00
2023-01-14 10:16:20 +01:00
2022-09-28 11:10:39 +02:00
2022-09-28 11:10:33 +02:00
2020-08-06 14:27:31 -07:00
2020-09-11 10:54:17 +02:00
2023-10-25 11:54:19 +02:00
2022-11-25 17:45:40 +01:00
2023-01-14 10:16:37 +01:00
2023-05-17 11:47:42 +02:00
2022-08-21 15:15:41 +02:00
2023-11-20 11:06:49 +01:00
2023-04-05 11:23:44 +02:00
2022-04-08 14:39:56 +02:00
2023-11-28 16:54:50 +00:00
2023-03-11 16:39:30 +01:00
2023-08-16 18:21:01 +02:00
2023-03-11 16:39:52 +01:00
2023-11-28 16:54:50 +00:00
2023-04-20 12:10:24 +02:00
2022-10-26 13:25:24 +02:00
2021-07-14 16:56:20 +02:00
2023-11-20 11:06:48 +01:00
2023-06-09 10:30:18 +02:00
2023-11-20 11:06:49 +01:00
2020-08-23 17:36:59 -05:00
2021-07-19 09:44:40 +02:00
2020-09-01 13:02:33 +05:30
2023-01-14 10:16:20 +01:00
2022-06-09 10:21:27 +02:00
2023-07-27 08:43:46 +02:00
2023-09-19 12:20:12 +02:00
2023-03-11 16:39:30 +01:00
2022-06-09 10:21:28 +02:00
2023-09-23 11:01:09 +02:00
2023-08-11 11:57:53 +02:00
2020-12-30 11:52:56 +01:00
2022-10-26 13:25:10 +02:00
2021-11-18 14:04:02 +01:00
2022-01-27 10:53:49 +01:00
2023-03-11 16:39:32 +01:00
2023-05-17 11:47:38 +02:00
2020-08-23 17:36:59 -05:00
2023-03-11 16:40:20 +01:00
2023-03-11 16:39:30 +01:00
2023-10-25 11:54:13 +02:00
2021-04-21 13:00:52 +02:00
2023-09-19 12:20:13 +02:00
2021-07-19 09:44:36 +02:00
2023-07-27 08:44:29 +02:00
2023-06-14 11:10:00 +02:00
2023-07-27 08:44:33 +02:00
2021-09-18 13:40:19 +02:00
2020-08-26 19:11:41 +02:00
2022-10-26 13:25:24 +02:00
2020-08-23 17:36:59 -05:00
2020-09-10 08:17:48 +02:00
2023-07-27 08:44:35 +02:00
2020-08-17 13:41:50 -04:00
2023-10-25 11:54:22 +02:00
2022-07-02 16:39:23 +02:00
2023-10-25 11:54:22 +02:00
2020-08-25 11:00:02 +02:00
2020-09-01 09:45:44 +02:00
2021-09-18 13:40:19 +02:00
2020-12-30 11:54:19 +01:00
2022-12-02 17:39:57 +01:00
2022-10-26 13:25:50 +02:00
2023-11-08 17:30:41 +01:00
2022-11-25 17:45:44 +01:00
2023-03-11 16:40:07 +01:00
2023-05-17 11:47:29 +02:00
2021-09-18 13:40:19 +02:00
2023-03-11 16:39:29 +01:00
2020-09-09 11:45:18 +02:00
2020-09-10 08:17:48 +02:00
2023-08-16 18:20:59 +02:00
2020-09-08 10:43:30 +02:00
2023-07-27 08:43:45 +02:00
2022-09-15 11:32:02 +02:00
2022-11-25 17:45:44 +01:00
2021-09-03 10:09:27 +02:00
2022-10-26 13:25:48 +02:00
2022-07-02 16:39:23 +02:00
2021-09-18 13:40:19 +02:00
2020-09-21 10:45:08 +02:00
2022-08-21 15:15:38 +02:00
2023-05-30 12:57:45 +01:00
2023-03-11 16:39:29 +01:00
2020-08-17 13:41:50 -04:00
2021-09-30 10:11:04 +02:00
2021-09-15 09:50:32 +02:00
2023-10-25 11:54:24 +02:00
2020-08-16 17:12:18 +02:00
2021-11-18 14:04:22 +01:00
2022-06-09 10:20:52 +02:00
2022-09-15 11:32:02 +02:00
2023-05-17 11:47:38 +02:00
2023-11-20 11:06:57 +01:00
2023-10-25 11:54:22 +02:00
2020-08-06 11:55:43 -07:00
2020-09-14 22:37:31 +03:00
2022-10-26 13:25:25 +02:00
2020-09-09 16:39:48 +02:00