2018-05-02 15:46:21 +02:00
|
|
|
|
2010-08-05 10:48:18 +10:00
|
|
|
|
|
|
|
|
|
2010-10-29 10:46:45 +02:00
|
|
|
|
2010-08-05 10:48:18 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-04-17 18:48:36 +02:00
|
|
|
|
2012-10-02 18:01:07 +01:00
|
|
|
|
2021-04-17 18:48:36 +02:00
|
|
|
|
2022-05-09 21:13:35 +02:00
|
|
|
|
2012-10-02 18:01:07 +01:00
|
|
|
|
drm/ttm: Include <linux/export.h>
Fix the compile-time warnings
drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
drivers/gpu/drm/ttm/tests/ttm_mock_manager.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
drivers/gpu/drm/ttm/ttm_agp_backend.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
drivers/gpu/drm/ttm/ttm_backup.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
drivers/gpu/drm/ttm/ttm_bo.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
drivers/gpu/drm/ttm/ttm_bo_util.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
drivers/gpu/drm/ttm/ttm_bo_vm.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
drivers/gpu/drm/ttm/ttm_device.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
drivers/gpu/drm/ttm/ttm_execbuf_util.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
drivers/gpu/drm/ttm/ttm_pool.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
drivers/gpu/drm/ttm/ttm_range_manager.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
drivers/gpu/drm/ttm/ttm_resource.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
drivers/gpu/drm/ttm/ttm_tt.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: a934a57a42f6 ("scripts/misc-check: check missing #include <linux/export.h> when W=1")
Reviewed-by: André Almeida <andrealmeid@igalia.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20250612121633.229222-10-tzimmermann@suse.de
2025-06-12 14:10:03 +02:00
|
|
|
|
|
|
|
|
|
2010-08-05 10:48:18 +10:00
|
|
|
|
2010-10-29 10:46:45 +02:00
|
|
|
|
2010-08-05 10:48:18 +10:00
|
|
|
|
2020-11-16 17:41:03 +00:00
|
|
|
|
2010-10-29 10:46:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-04 12:56:31 +10:00
|
|
|
|
2010-10-29 10:46:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-12 10:28:37 +01:00
|
|
|
|
|
|
|
|
|
2020-08-04 12:56:20 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-03 15:06:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-04-30 09:48:27 +02:00
|
|
|
|
2010-08-05 10:48:18 +10:00
|
|
|
|
2020-08-04 12:56:20 +10:00
|
|
|
|
2021-04-17 18:48:36 +02:00
|
|
|
|
2010-10-29 10:46:45 +02:00
|
|
|
|
2017-02-02 21:04:38 +00:00
|
|
|
|
2010-08-05 10:48:18 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-27 13:16:04 +02:00
|
|
|
|
2010-08-05 10:48:18 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 17:06:51 -08:00
|
|
|
|
2013-07-27 13:37:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-02 21:04:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-02 20:03:57 +03:00
|
|
|
|
2021-04-17 18:48:36 +02:00
|
|
|
|
|
|
|
|
|
2013-07-27 13:37:59 +02:00
|
|
|
|
2021-04-17 18:48:36 +02:00
|
|
|
|
2022-10-27 14:42:37 +05:30
|
|
|
|
2021-04-30 09:48:27 +02:00
|
|
|
|
2017-02-02 21:04:38 +00:00
|
|
|
|
2013-07-27 13:37:59 +02:00
|
|
|
|
|
|
|
|
|
2021-06-07 12:39:10 +02:00
|
|
|
|
drm/ttm: Fix a kernel oops due to an invalid read
The res is initialized here only if there's no errors so passing it to
ttm_resource_fini in the error paths results in a kernel oops. In the
error paths, instead of the unitialized res, we have to use to use
node->base on which ttm_resource_init was called.
Sample affected backtrace:
Unable to handle kernel NULL pointer dereference at virtual address 00000000000000d8
Mem abort info:
ESR = 0x96000004
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x04: level 0 translation fault
Data abort info:
ISV = 0, ISS = 0x00000004
CM = 0, WnR = 0
user pgtable: 4k pages, 48-bit VAs, pgdp=0000000106ac0000
[00000000000000d8] pgd=0000000000000000, p4d=0000000000000000
Internal error: Oops: 96000004 [#1] SMP
Modules linked in: bnep vsock_loopback vmw_vsock_virtio_transport_common
vsock snd_hda_codec_generic snd_hda_intel snd_intel_dspcfg snd_hda_codec
snd_hwdep >
CPU: 0 PID: 1197 Comm: gnome-shell Tainted: G U 5.17.0-rc2-vmwgfx #2
Hardware name: VMware, Inc. VBSA/VBSA, BIOS VEFI 12/31/2020
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : ttm_resource_fini+0x5c/0xac [ttm]
lr : ttm_range_man_alloc+0x128/0x1e0 [ttm]
sp : ffff80000d783510
x29: ffff80000d783510 x28: 0000000000000000 x27: ffff000086514400
x26: 0000000000000300 x25: ffff0000809f9e78 x24: 0000000000000000
x23: ffff80000d783680 x22: ffff000086514400 x21: 00000000ffffffe4
x20: ffff80000d7836a0 x19: ffff0000809f9e00 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
x14: 0000000000000000 x13: 0000000000000800 x12: ffff0000f2600a00
x11: 000000000000fc96 x10: 0000000000000000 x9 : ffff800001295c18
x8 : 0000000000000000 x7 : 0000000000000300 x6 : 0000000000000000
x5 : 0000000000000000 x4 : ffff0000f1034e20 x3 : ffff0000f1034600
x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000600000
Call trace:
ttm_resource_fini+0x5c/0xac [ttm]
ttm_range_man_alloc+0x128/0x1e0 [ttm]
ttm_resource_alloc+0x58/0x90 [ttm]
ttm_bo_mem_space+0xc8/0x3e4 [ttm]
ttm_bo_validate+0xb4/0x134 [ttm]
vmw_bo_pin_in_start_of_vram+0xbc/0x200 [vmwgfx]
vmw_framebuffer_pin+0xc0/0x154 [vmwgfx]
vmw_ldu_primary_plane_atomic_update+0x8c/0x6e0 [vmwgfx]
drm_atomic_helper_commit_planes+0x11c/0x2e0
drm_atomic_helper_commit_tail+0x60/0xb0
commit_tail+0x1b0/0x210
drm_atomic_helper_commit+0x168/0x400
drm_atomic_commit+0x64/0x74
drm_atomic_helper_set_config+0xdc/0x11c
drm_mode_setcrtc+0x1c4/0x780
drm_ioctl_kernel+0xd0/0x1a0
drm_ioctl+0x2c4/0x690
vmw_generic_ioctl+0xe0/0x174 [vmwgfx]
vmw_unlocked_ioctl+0x24/0x30 [vmwgfx]
__arm64_sys_ioctl+0xb4/0x100
invoke_syscall+0x78/0x100
el0_svc_common.constprop.0+0x54/0x184
do_el0_svc+0x34/0x9c
el0_svc+0x48/0x1b0
el0t_64_sync_handler+0xa4/0x130
el0t_64_sync+0x1a4/0x1a8
Code: 35000260 f9401a81 52800002 f9403a60 (f9406c23)
---[ end trace 0000000000000000 ]---
Signed-off-by: Zack Rusin <zackr@vmware.com>
Fixes: de3688e469b0 ("drm/ttm: add ttm_resource_fini v2")
Cc: Christian König <christian.koenig@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220318174332.440068-6-zack@kde.org
2022-03-18 13:43:32 -04:00
|
|
|
|
2013-07-27 13:37:59 +02:00
|
|
|
|
2021-06-07 12:39:10 +02:00
|
|
|
|
|
|
|
|
|
2010-08-05 10:48:18 +10:00
|
|
|
|
2021-06-07 12:39:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-05 10:48:18 +10:00
|
|
|
|
|
|
|
|
|
2020-08-03 15:06:38 +02:00
|
|
|
|
2021-04-30 09:48:27 +02:00
|
|
|
|
2010-08-05 10:48:18 +10:00
|
|
|
|
2021-04-30 09:48:27 +02:00
|
|
|
|
2020-08-04 12:56:20 +10:00
|
|
|
|
2021-04-17 18:48:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-09 15:18:39 +02:00
|
|
|
|
2021-04-17 18:48:36 +02:00
|
|
|
|
2010-08-05 10:48:18 +10:00
|
|
|
|
|
|
|
|
|
2022-08-20 00:33:00 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-12 10:28:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-20 00:33:00 -07:00
|
|
|
|
|
|
|
|
|
2021-02-12 10:28:37 +01:00
|
|
|
|
|
|
|
|
|
2020-08-04 12:55:56 +10:00
|
|
|
|
2021-04-17 18:48:36 +02:00
|
|
|
|
2021-11-21 07:54:52 -08:00
|
|
|
|
|
|
|
|
|
2021-04-17 18:48:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-21 07:54:52 -08:00
|
|
|
|
|
|
|
|
|
2021-04-17 18:48:36 +02:00
|
|
|
|
2021-09-13 16:09:50 +08:00
|
|
|
|
2020-09-11 16:01:21 +02:00
|
|
|
|
2020-08-04 12:55:56 +10:00
|
|
|
|
2010-08-05 10:48:18 +10:00
|
|
|
|
2020-08-04 12:56:31 +10:00
|
|
|
|
2010-10-29 10:46:45 +02:00
|
|
|
|
2010-08-05 10:48:18 +10:00
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2010-10-29 10:46:45 +02:00
|
|
|
|
2010-08-05 10:48:18 +10:00
|
|
|
|
|
|
|
|
|
2020-08-04 12:56:20 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-04 12:56:30 +10:00
|
|
|
|
2020-08-04 12:56:19 +10:00
|
|
|
|
2021-08-30 09:22:06 +02:00
|
|
|
|
2020-08-04 12:56:19 +10:00
|
|
|
|
2013-07-01 20:32:58 +02:00
|
|
|
|
2010-10-29 10:46:45 +02:00
|
|
|
|
2010-08-05 10:48:18 +10:00
|
|
|
|
2020-08-04 12:56:20 +10:00
|
|
|
|
2020-08-04 12:56:31 +10:00
|
|
|
|
2020-08-04 12:55:47 +10:00
|
|
|
|
|
|
|
|
|
2021-09-13 16:09:50 +08:00
|
|
|
|
2020-08-04 12:55:47 +10:00
|
|
|
|
2021-04-17 18:48:36 +02:00
|
|
|
|
2021-11-21 07:54:52 -08:00
|
|
|
|
|
|
|
|
|
2021-04-17 18:48:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-21 07:54:52 -08:00
|
|
|
|
2021-04-17 18:48:36 +02:00
|
|
|
|
2021-09-13 16:09:50 +08:00
|
|
|
|
2020-08-04 12:56:19 +10:00
|
|
|
|
2020-08-04 12:55:59 +10:00
|
|
|
|
2020-08-04 12:56:31 +10:00
|
|
|
|
2020-08-04 12:56:20 +10:00
|
|
|
|
2020-08-04 12:56:07 +10:00
|
|
|
|
2020-08-04 12:55:59 +10:00
|
|
|
|
|
|
|
|
|
2021-07-14 14:54:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-04 12:56:31 +10:00
|
|
|
|
2020-08-04 12:55:59 +10:00
|
|
|
|
2020-10-01 15:21:00 +02:00
|
|
|
|
2020-08-04 12:55:59 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-04 12:56:07 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-04 12:56:31 +10:00
|
|
|
|
2020-08-04 12:56:20 +10:00
|
|
|
|
|
|
|
|
|
2020-08-04 12:55:59 +10:00
|
|
|
|
|
|
|
|
|
2021-09-13 16:09:50 +08:00
|
|
|
|