Zheyu Ma
5c3d753b87
drm/ttm: add a check against null pointer dereference
...
[ Upstream commit 9e5c772954406829e928dbe59891d08938ead04b ]
When calling ttm_range_man_fini(), 'man' may be uninitialized, which may
cause a null pointer dereference bug.
Fix this by checking if it is a null pointer.
This log reveals it:
[ 7.902580 ] BUG: kernel NULL pointer dereference, address: 0000000000000058
[ 7.905721 ] RIP: 0010:ttm_range_man_fini+0x40/0x160
[ 7.911826 ] Call Trace:
[ 7.911826 ] radeon_ttm_fini+0x167/0x210
[ 7.911826 ] radeon_bo_fini+0x15/0x40
[ 7.913767 ] rs400_fini+0x55/0x80
[ 7.914358 ] radeon_device_fini+0x3c/0x140
[ 7.914358 ] radeon_driver_unload_kms+0x5c/0xe0
[ 7.914358 ] radeon_driver_load_kms+0x13a/0x200
[ 7.914358 ] ? radeon_driver_unload_kms+0xe0/0xe0
[ 7.914358 ] drm_dev_register+0x1db/0x290
[ 7.914358 ] radeon_pci_probe+0x16a/0x230
[ 7.914358 ] local_pci_probe+0x4a/0xb0
Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1626274459-8148-1-git-send-email-zheyuma97@gmail.com
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-31 08:16:12 +02:00
..
2021-07-28 14:35:47 +02:00
2020-06-10 09:02:03 +02:00
2021-07-19 09:44:58 +02:00
2020-09-23 09:52:24 +10:00
2020-12-30 11:52:56 +01:00
2021-07-20 16:05:37 +02:00
2020-07-02 20:25:51 +02:00
2020-08-11 11:58:31 +10:00
2021-07-19 09:44:44 +02:00
2021-03-30 14:31:55 +02:00
2020-11-23 10:01:32 +09:00
2020-09-08 14:41:40 +10:00
2021-07-20 16:05:48 +02:00
2021-03-07 12:34:11 +01:00
2020-08-06 14:27:31 -07:00
2020-09-11 10:54:17 +02:00
2021-07-28 14:35:48 +02:00
2021-04-16 11:43:20 +02:00
2021-07-20 16:05:37 +02:00
2021-03-04 11:37:49 +01:00
2021-06-16 12:01:44 +02:00
2021-07-19 09:44:38 +02:00
2021-06-03 09:00:36 +02:00
2020-08-27 11:17:52 +02:00
2021-07-19 09:44:58 +02:00
2021-07-19 09:44:36 +02:00
2021-07-19 09:44:58 +02:00
2020-12-30 11:53:13 +01:00
2021-07-28 14:35:41 +02:00
2021-05-14 09:50:01 +02:00
2021-07-14 16:56:19 +02:00
2021-07-14 16:56:20 +02:00
2021-07-19 09:44:57 +02:00
2021-03-04 11:37:38 +01:00
2021-07-19 09:44:57 +02: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
2020-06-10 09:05:18 +02:00
2020-09-08 14:41:40 +10:00
2021-05-14 09:50:22 +02:00
2021-06-23 14:42:49 +02:00
2021-07-19 09:44:58 +02:00
2020-08-21 15:17:05 +03:00
2021-05-14 09:50:21 +02:00
2021-03-17 17:06:19 +01:00
2021-07-31 08:16:12 +02:00
2020-12-30 11:52:56 +01:00
2021-03-17 17:06:19 +01:00
2020-10-26 11:43:31 +01:00
2020-09-14 09:12:24 +02:00
2021-07-19 09:44:57 +02:00
2020-09-11 10:47:19 +02:00
2020-08-23 17:36:59 -05:00
2021-07-19 09:44:39 +02:00
2021-05-11 14:47:26 +02:00
2021-07-14 16:56:16 +02:00
2021-04-21 13:00:52 +02:00
2021-05-14 09:50:26 +02:00
2021-07-19 09:44:36 +02:00
2021-01-27 11:54:55 +01:00
2020-07-02 20:25:51 +02:00
2020-07-02 15:26:00 +02:00
2020-07-02 15:26:00 +02:00
2021-06-30 08:47:30 -04:00
2020-05-14 02:10:52 +03:00
2020-08-26 19:11:41 +02:00
2021-07-14 16:56:15 +02:00
2020-08-23 17:36:59 -05:00
2020-09-10 08:17:48 +02:00
2020-05-27 14:31:42 +03:00
2020-05-26 13:31:01 +02:00
2020-08-17 13:41:50 -04:00
2020-09-01 13:38:34 +03:00
2020-07-13 13:29:20 -04:00
2020-07-02 15:26:00 +02:00
2020-08-25 11:00:02 +02:00
2020-09-01 09:45:44 +02:00
2020-06-25 15:47:14 -07:00
2020-12-30 11:54:19 +01:00
2021-07-19 09:44:57 +02:00
2021-07-20 16:05:37 +02:00
2020-09-21 10:45:08 +02:00
2020-12-30 11:54:29 +01:00
2020-06-19 09:20:21 +02:00
2021-03-04 11:37:36 +01:00
2020-07-02 15:26:00 +02:00
2020-05-26 13:33:08 +02:00
2020-06-19 13:33:40 +01:00
2020-09-09 11:45:18 +02:00
2020-09-10 08:17:48 +02:00
2020-05-19 22:31:31 +01:00
2021-03-17 17:06:19 +01:00
2020-09-08 10:43:30 +02:00
2020-11-20 05:20:48 +10:00
2020-10-28 12:27:41 +01:00
2020-05-05 14:01:53 -04:00
2020-09-21 10:45:08 +02:00
2021-03-17 17:06:18 +01:00
2021-07-28 14:35:47 +02:00
2020-05-29 12:58:11 +02:00
2020-07-02 15:26:00 +02:00
2020-07-02 15:26:00 +02:00
2020-09-21 10:45:08 +02:00
2020-08-11 11:58:31 +10:00
2020-07-10 20:21:45 +02:00
2020-06-23 15:46:40 +02:00
2020-07-02 15:26:00 +02:00
2020-08-17 13:41:50 -04:00
2021-03-04 11:38:27 +01:00
2020-08-11 11:58:31 +10:00
2021-05-11 14:47:22 +02:00
2020-08-16 17:12:18 +02:00
2020-07-02 15:26:00 +02:00
2020-08-25 11:00:02 +02:00
2020-10-27 11:21:04 +01:00
2021-05-14 09:50:23 +02:00
2020-06-02 10:59:11 -07:00
2021-01-27 11:54:55 +01:00
2020-06-03 10:24:23 +02:00
2020-08-06 11:55:43 -07:00
2020-09-14 22:37:31 +03:00
2020-06-24 15:45:51 +10:00
2020-05-20 20:03:45 +02:00
2021-03-30 14:31:51 +02:00
2020-09-09 16:39:48 +02:00