Chris Bainbridge 2897e1769c Fix segfault on dock suspend, unplug, resume
`drmmode_set_mode` can segfault if a USB-C dock with external monitors
is disconnected during suspend. It appears that some data structures are
not updated, but the associated `drmModeConnectorPtr` associated with
those structures is NULL. Dereferencing that pointer results in Xorg
crashing.

Backtrace:

    (crtc=crtc@entry=0x55a0c7610390, fb=fb@entry=0x55a0c86d7410, mode=mode@entry=0x55a0c76103a8, x=x@entry=0, y=y@entry=0) at drmmode_display.c:1267
    (crtc=0x55a0c7610390, mode=0x55a0c76103a8, rotation=<optimized out>, x=<optimized out>, y=<optimized out>) at drmmode_display.c:1371
    (main=main@entry=0x55a0c63f4b40, argc=argc@entry=10, argv=argv@entry=0x7fffb7cefbf8)
    at ../sysdeps/nptl/libc_start_call_main.h:58
    (main=0x55a0c63f4b40, argc=10, argv=0x7fffb7cefbf8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffb7cefbe8) at ../csu/libc-start.c:381

Fix this by checking the pointer before dereferencing it.

Fixes: https://gitlab.freedesktop.org/drm/amd/-/issues/2375
Signed-off-by: Chris Bainbridge <chris.bainbridge@gmail.com>
2023-07-11 12:00:11 +01:00
2022-12-05 16:52:52 +01:00
2018-08-24 17:17:43 +02:00
2016-07-12 16:03:51 +09:00
2018-08-24 17:17:43 +02:00
2017-07-27 15:13:36 +09:00
2018-11-14 09:58:46 +01:00

xf86-video-amdgpu - Xorg driver for AMD Radeon GPUs using the amdgpu kernel driver

Questions regarding this software should be directed at the amd-gfx mailing list.

The main development code repository can be found at FreeDesktop Gitlab.

Please submit bug reports there and use merge requests for patch submission.

See the X.org wiki for further patch submission instructions and more information on the git code manager.

Description
No description provided
Readme 2.9 MiB
Languages
C 94.7%
M4 2.8%
Makefile 1.6%
Perl 0.8%