mesa/src/vulkan
Erik Kurzinger b7be28b062 vulkan/device_select: avoid segfault on Wayland if wl_drm is unavailable
On Wayland, if the wl_drm interface is not available, for example if the
compositor is using the proprietary NVIDIA driver along with their egl-wayland
library, the device_select layer will fail to initialize. However, the failure
path will unconditionally call wl_drm_destroy even though info.wl_drm would be
NULL in that case. This can cause a segfault in libwayland-client.so.

To fix this, check if info.wl_drm is NULL before calling wl_drm_destroy. This
way, initialization will fail gracefully even if that interface is not present.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10598>

(cherry picked from commit f4eb13dc55)
2021-06-02 20:08:40 +02:00
..
device-select-layer vulkan/device_select: avoid segfault on Wayland if wl_drm is unavailable 2021-06-02 20:08:40 +02:00
overlay-layer vulkan-overlay-layer: Use the new dispatch tables 2021-02-01 18:54:24 +00:00
registry vulkan: Update XML and headers to 1.2.168 2021-01-27 22:20:52 +00:00
util vulkan: Support 32-bit "weak" symbols on MSVC 2021-05-18 23:02:27 +02:00
wsi vulkan/wsi/display: don't report support if there is no drm fd 2021-04-28 09:36:09 -07:00
Android.mk vulkan: Add framework for common entrypoints 2021-02-01 18:54:24 +00:00
Makefile.sources android: vulkan/util: add vk_descriptors.{c,h} to Makefile.sources 2021-03-23 20:29:55 +01:00
meson.build vulkan: fix duplicate win32 def 2021-05-10 21:44:58 +02:00
vulkan-icd-symbols.txt vulkan: Allow global symbol HMI for Android 2020-08-05 18:08:07 +00:00