Guchun Chen
1a68d96f81
drm/amdgpu: fix NULL pointer access issue when unloading driver
When unloading driver by "modprobe -r amdgpu", one NULL pointer
dereference bug occurs in ras debugfs releasing. The cause is the
duplicated debugfs_remove, as drm debugfs_root dir has been cleaned
up already by drm_minor_unregister.
BUG: kernel NULL pointer dereference, address: 00000000000000a0
PGD 0 P4D 0
Oops: 0002 [#1] SMP PTI
CPU: 11 PID: 1526 Comm: modprobe Tainted: G OE 5.6.0-guchchen #1
Hardware name: System manufacturer System Product Name/TUF Z370-PLUS GAMING II, BIOS 0411 09/21/2018
RIP: 0010:down_write+0x15/0x40
Code: eb de e8 7e 17 72 ff cc cc cc cc cc cc cc cc cc cc cc cc cc cc 0f 1f 44 00 00 53 48 89 fb e8 92
d8 ff ff 31 c0 ba 01 00 00 00 <f0> 48 0f b1 13 75 0f 65 48 8b 04 25 c0 8b 01 00 48 89 43 08 5b c3
RSP: 0018:ffffb1590386fcd0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 00000000000000a0 RCX: 0000000000000000
RDX: 0000000000000001 RSI: ffffffff85b2fcc2 RDI: 00000000000000a0
RBP: ffffb1590386fd30 R08: ffffffff85b2fcc2 R09: 000000000002b3c0
R10: ffff97a330618c40 R11: 00000000000005f6 R12: ffff97a3481beb40
R13: 00000000000000a0 R14: ffff97a3481beb40 R15: 0000000000000000
FS: 00007fb11a717540(0000) GS:ffff97a376cc0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000000000a0 CR3: 00000004066d6006 CR4: 00000000003606e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
simple_recursive_removal+0x63/0x370
? debugfs_remove+0x60/0x60
debugfs_remove+0x40/0x60
amdgpu_ras_fini+0x82/0x230 [amdgpu]
? __kernfs_remove.part.17+0x101/0x1f0
? kernfs_name_hash+0x12/0x80
amdgpu_device_fini+0x1c0/0x580 [amdgpu]
amdgpu_driver_unload_kms+0x3e/0x70 [amdgpu]
amdgpu_pci_remove+0x36/0x60 [amdgpu]
pci_device_remove+0x3b/0xb0
device_release_driver_internal+0xe5/0x1c0
driver_detach+0x46/0x90
bus_remove_driver+0x58/0xd0
pci_unregister_driver+0x29/0x90
amdgpu_exit+0x11/0x25 [amdgpu]
__x64_sys_delete_module+0x13d/0x210
do_syscall_64+0x5f/0x250
entry_SYSCALL_64_after_hwframe+0x44/0xa9
Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-08-18 17:00:46 -04:00
..
2020-01-22 16:55:27 -05:00
2020-05-28 14:00:49 -04:00
2019-06-10 23:02:48 +02:00
2020-06-10 19:14:18 -07:00
2019-01-14 15:04:29 -05:00
2020-06-10 19:14:18 -07:00
2020-06-10 19:14:18 -07:00
2020-06-10 19:14:18 -07:00
2020-02-28 16:59:20 -05:00
2020-07-01 01:59:11 -04:00
2020-06-10 19:14:18 -07:00
2020-07-02 15:17:31 +10:00
2020-07-02 12:02:50 -04:00
2020-06-11 18:17:48 -07:00
2020-07-21 15:37:37 -04:00
2020-07-21 15:37:37 -04:00
2020-07-02 12:02:57 -04:00
2020-07-01 01:59:14 -04:00
2020-01-07 11:55:56 -05:00
2020-04-28 16:20:29 -04:00
2020-03-30 09:52:23 -05:00
2020-05-19 22:31:31 +01:00
2019-05-24 12:21:02 -05:00
2020-04-09 10:43:18 -04:00
2020-07-01 01:59:22 -04:00
2020-07-02 15:17:31 +10:00
2019-10-25 11:40:50 +02:00
2018-11-05 14:21:50 -05:00
2020-04-09 10:43:14 -04:00
2020-04-09 10:43:14 -04:00
2020-07-21 15:37:37 -04:00
2020-05-18 11:23:37 -04:00
2020-08-06 16:44:41 -04:00
2020-05-08 14:32:10 -04:00
2020-07-02 12:02:51 -04:00
2020-07-02 12:02:51 -04:00
2020-07-02 15:17:31 +10:00
2019-07-30 23:48:32 -05:00
2020-07-13 10:47:26 +02:00
2019-10-28 16:59:43 +01:00
2020-07-01 01:59:07 -04:00
2020-07-15 12:41:32 -04:00
2020-07-21 15:37:40 -04:00
2020-07-21 15:37:39 -04:00
2019-10-03 09:11:05 -05:00
2020-06-24 15:45:51 +10:00
2020-07-14 14:38:41 -04:00
2020-07-01 01:59:23 -04:00
2020-05-29 13:55:08 -04:00
2019-11-13 15:29:44 -05:00
2018-11-05 14:21:16 -05:00
2019-08-12 12:47:47 -05:00
2020-07-14 14:38:41 -04:00
2019-09-16 09:59:21 -05:00
2020-07-21 15:37:37 -04:00
2020-07-21 15:37:37 -04:00
2020-07-01 01:59:11 -04:00
2020-07-08 09:03:00 -04:00
2020-07-20 17:30:23 +10:00
2019-06-10 23:02:48 +02:00
2020-07-14 14:38:41 -04:00
2020-07-02 12:02:50 -04:00
2019-08-13 09:09:30 +02:00
2019-11-19 10:12:54 -05:00
2019-03-19 15:36:58 -05:00
2019-06-10 23:02:48 +02:00
2020-04-13 12:02:40 -04:00
2019-02-13 17:47:11 -05:00
2020-07-10 17:40:39 -04:00
2020-04-28 16:20:29 -04:00
2020-07-01 01:59:19 -04:00
2020-07-01 01:59:19 -04:00
2020-07-02 15:17:31 +10:00
2020-07-01 01:59:11 -04:00
2020-03-10 15:55:11 -04:00
2020-03-05 00:32:40 -05:00
2019-11-23 19:56:45 -04:00
2019-11-23 19:56:45 -04:00
2020-02-13 13:08:13 +01:00
2020-03-10 15:55:11 -04:00
2020-04-01 14:44:42 -04:00
2020-06-30 14:04:00 +10:00
2020-06-30 14:04:00 +10:00
2019-06-10 23:02:48 +02:00
2020-08-06 16:43:15 -04:00
2020-05-26 15:51:45 -04:00
2020-02-11 15:35:54 -05:00
2019-06-20 11:36:22 -05:00
2020-08-06 16:44:59 -04:00
2020-07-08 09:01:11 -04:00
2020-03-16 16:21:32 -04:00
2020-07-21 15:37:40 -04:00
2020-08-18 17:00:46 -04:00
2020-07-15 12:41:47 -04:00
2020-04-13 12:02:26 -04:00
2020-07-01 01:59:07 -04:00
2019-12-03 11:57:00 -05:00
2020-03-16 16:17:55 -04:00
2019-06-10 23:02:48 +02:00
2019-06-10 22:59:53 +02:00
2019-06-10 23:00:08 +02:00
2020-03-10 15:55:11 -04:00
2020-04-28 16:20:29 -04:00
2019-06-21 18:59:34 -05:00
2020-07-01 01:59:22 -04:00
2020-07-01 01:59:22 -04:00
2020-04-28 16:20:30 -04:00
2019-06-10 23:02:48 +02:00
2020-07-02 12:02:56 -04:00
2020-07-29 09:43:06 +10:00
2020-06-30 14:04:00 +10:00
2020-07-15 12:46:52 -04:00
2020-07-08 09:01:04 -04:00
2020-04-13 12:01:50 -04:00
2020-01-07 11:58:37 -05:00
2020-07-01 01:59:24 -04:00
2018-11-26 15:47:34 -05:00
2020-04-28 16:20:30 -04:00
2019-10-25 16:15:00 -04:00
2020-07-21 15:37:40 -04:00
2020-07-21 15:37:40 -04:00
2017-10-20 13:28:44 -04:00
2017-09-28 16:03:20 -04:00
2020-07-02 12:02:50 -04:00
2020-07-01 01:59:17 -04:00
2020-04-28 16:20:30 -04:00
2020-07-20 17:30:23 +10:00
2020-06-03 13:51:38 -04:00
2020-07-02 12:02:50 -04:00
2020-08-10 18:06:10 -04:00
2020-07-01 01:59:23 -04:00
2020-04-22 18:11:46 -04:00
2020-07-15 12:42:01 -04:00
2019-10-03 09:11:05 -05:00
2020-01-22 16:55:27 -05:00
2019-08-12 12:47:48 -05:00
2020-01-22 16:55:27 -05:00
2019-06-20 21:35:29 -05:00
2020-07-15 12:47:25 -04:00
2020-07-01 01:59:07 -04:00
2020-04-09 10:43:33 -04:00
2019-06-10 23:00:01 +02:00
2019-06-10 23:04:34 +02:00
2020-02-26 14:21:13 -05:00
2019-06-10 23:04:34 +02:00
2018-03-14 15:39:51 -05:00
2019-11-13 15:29:44 -05:00
2019-01-25 16:15:36 -05:00
2019-06-10 23:04:34 +02:00
2020-04-28 16:20:29 -04:00
2020-07-15 12:42:01 -04:00
2020-01-14 10:18:08 -05:00
2020-07-02 12:02:50 -04:00
2017-12-13 17:28:08 -05:00
2019-06-20 21:16:37 -05:00
2019-06-10 23:04:34 +02:00
2020-06-24 15:45:51 +10:00
2020-06-24 15:45:51 +10:00
2020-06-24 15:45:51 +10:00
2020-07-02 15:17:31 +10:00
2020-04-22 18:11:49 -04:00
2020-01-14 10:18:58 -05:00
2018-04-11 13:07:54 -05:00
2020-07-01 01:59:22 -04:00
2019-06-20 11:35:45 -05:00
2018-02-19 14:19:49 -05:00
2020-05-18 11:24:21 -04:00
2020-07-02 12:02:50 -04:00
2020-07-02 12:02:50 -04:00
2020-08-10 18:08:21 -04:00
2017-08-15 14:46:13 -04:00
2020-04-22 18:11:49 -04:00
2020-03-05 00:32:47 -05:00
2020-08-18 16:58:59 -04:00
2019-06-21 18:59:23 -05:00
2020-07-08 09:03:38 -04:00
2018-11-05 14:21:24 -05:00
2019-12-03 11:52:11 -05:00
2018-09-10 22:46:22 -05:00
2020-07-08 09:03:43 -04:00
2019-10-03 09:11:04 -05:00
2020-08-10 18:06:35 -04:00
2020-07-01 01:59:24 -04:00
2020-07-02 12:02:50 -04:00
2020-07-02 12:02:50 -04:00
2020-07-02 12:02:50 -04:00
2020-07-08 09:03:06 -04:00
2020-01-07 12:03:42 -05:00
2020-07-15 12:46:38 -04:00
2019-06-20 21:35:29 -05:00
2019-06-10 23:04:34 +02:00
2020-07-08 09:03:19 -04:00
2019-11-19 10:12:49 -05:00
2020-07-08 09:03:32 -04:00
2019-11-19 10:12:50 -05:00
2020-07-01 01:59:26 -04:00
2019-11-19 10:12:50 -05:00
2020-08-06 16:30:03 -04:00
2020-07-01 01:59:09 -04:00
2019-12-11 15:22:08 -05:00
2019-06-10 23:04:34 +02:00
2019-06-10 23:04:34 +02:00
2020-07-01 01:59:24 -04:00
2020-07-01 01:59:11 -04:00
2020-07-01 01:59:12 -04:00
2019-07-08 13:56:02 -05:00
2020-07-08 09:03:55 -04:00
2019-08-12 12:47:48 -05:00
2020-08-10 18:06:35 -04:00
2019-10-03 09:11:05 -05:00
2020-07-08 09:04:08 -04:00
2019-12-03 11:08:24 -05:00
2019-12-18 16:33:26 -05:00
2020-03-06 14:34:42 -05:00
2020-07-15 12:45:05 -04:00
2019-12-23 15:00:00 -05:00
2020-04-24 11:42:11 -04:00
2020-04-01 14:44:43 -04:00
2020-04-24 11:42:11 -04:00
2019-04-19 11:33:27 -05:00
2020-04-01 14:44:43 -04:00
2020-07-21 15:37:39 -04:00
2019-06-20 21:35:30 -05:00
2019-10-03 09:11:05 -05:00
2020-04-28 15:58:12 -04:00
2019-10-03 09:11:05 -05:00
2019-10-03 09:11:05 -05:00
2020-07-01 01:59:07 -04:00
2019-09-13 17:11:03 -05:00
2020-04-01 14:44:42 -04:00
2019-09-13 17:11:03 -05:00
2020-04-01 14:44:42 -04:00
2019-09-13 17:11:03 -05:00
2020-04-13 12:01:50 -04:00
2019-09-13 17:11:03 -05:00
2020-08-07 17:47:25 -04:00
2020-07-02 12:02:50 -04:00
2020-05-14 16:42:43 -04:00
2018-06-15 12:20:42 -05:00
2020-07-01 01:59:19 -04:00
2020-04-23 15:41:06 -04:00
2018-02-19 14:18:31 -05:00
2020-05-22 13:41:53 -04:00
2018-02-19 14:18:31 -05:00
2020-07-21 15:37:37 -04:00
2018-08-27 11:10:34 -05:00
2020-04-23 15:40:46 -04:00
2019-08-12 12:47:50 -05:00
2020-06-03 13:52:04 -04:00
2020-04-28 16:20:29 -04:00
2020-04-28 16:20:29 -04:00
2020-07-01 01:59:27 -04:00
2020-07-14 15:42:17 -04:00
2020-06-03 13:52:04 -04:00
2020-07-15 12:46:26 -04:00
2020-06-03 13:52:04 -04:00
2020-04-28 16:20:29 -04:00
2020-07-02 12:02:49 -04:00
2020-05-28 14:00:50 -04:00
2020-07-02 12:02:50 -04:00
2020-07-01 01:59:24 -04:00
2019-06-10 23:04:34 +02:00
2020-07-15 12:42:01 -04:00
2018-02-19 14:18:08 -05:00
2020-07-02 12:02:50 -04:00
2020-06-03 13:52:00 -04:00
2020-07-01 01:59:16 -04:00
2020-07-21 15:37:49 -04:00
2020-07-21 15:37:49 -04:00
2020-07-01 01:59:24 -04:00
2020-07-15 12:42:01 -04:00
2020-07-02 12:02:50 -04:00
2020-05-14 16:42:43 -04:00
2020-04-30 16:48:27 -04:00
2018-11-06 14:02:41 -05:00
2019-06-10 23:04:34 +02:00
2019-10-03 09:11:01 -05:00
2019-10-03 09:11:01 -05:00
2020-04-27 15:52:10 -04:00
2019-12-11 15:22:07 -05:00
2020-07-01 01:59:24 -04:00
2020-07-01 01:59:24 -04:00
2020-04-09 10:43:14 -04:00
2020-04-09 10:43:14 -04:00
2020-04-09 10:43:14 -04:00
2020-07-08 09:03:25 -04:00
2020-04-09 10:43:14 -04:00
2020-04-09 10:43:14 -04:00
2020-07-08 09:03:25 -04:00
2020-07-08 09:03:19 -04:00
2019-12-18 16:09:07 -05:00
2020-07-08 09:03:32 -04:00
2020-01-27 16:46:44 -05:00
2020-07-01 01:59:24 -04:00
2019-07-18 14:18:05 -05:00
2020-08-06 16:33:18 -04:00
2020-07-01 01:59:09 -04:00
2020-01-22 16:55:27 -05:00
2019-10-03 09:11:05 -05:00
2019-10-03 09:11:05 -05:00
2020-07-15 12:42:01 -04:00
2020-07-02 12:02:50 -04:00
2020-07-02 12:02:50 -04:00