Timo Aaltonen pushed to branch debian-unstable at X Strike Force / lib / mesa
Commits:
-
995d2c7d
by Timo Aaltonen at 2022-12-05T16:34:34+02:00
-
42ebe819
by Timo Aaltonen at 2022-12-05T16:40:11+02:00
4 changed files:
- debian/changelog
- + debian/patches/0001-d3d12-Don-t-crash-when-libd3d12.so-can-t-be-found.patch
- + debian/patches/0002-dzn-Don-t-crash-when-libd3d12.so-can-t-be-found.patch
- debian/patches/series
Changes:
1 | +mesa (22.3.0-2) unstable; urgency=medium
|
|
2 | + |
|
3 | + * patches: Import two upstream commits to fix crashes when libd3d12.so
|
|
4 | + can't be found. (Closes: #1025312)
|
|
5 | + |
|
6 | + -- Timo Aaltonen <tjaalton@debian.org> Mon, 05 Dec 2022 16:34:36 +0200
|
|
7 | + |
|
1 | 8 | mesa (22.3.0-1) unstable; urgency=medium
|
2 | 9 | |
3 | 10 | * New upstream release.
|
1 | +From b3d1ae19f2f4d93cf0a5f45a598149ac4e8e05aa Mon Sep 17 00:00:00 2001
|
|
2 | +From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
|
|
3 | +Date: Sun, 4 Dec 2022 00:17:57 +0000
|
|
4 | +Subject: [PATCH 1/2] d3d12: Don't crash when libd3d12.so can't be found
|
|
5 | + |
|
6 | +`d3d12_destroy_screen` is called by `d3d12_create_dxcore_screen` after
|
|
7 | +`d3d12_init_screen_base` fails and attempts to call `util_dl_close` on
|
|
8 | +a NULL pointer, leading to an abort.
|
|
9 | + |
|
10 | +To fix this, only close the library after if it was actually opened.
|
|
11 | + |
|
12 | +Cc: mesa-stable
|
|
13 | +Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
|
|
14 | +Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20145>
|
|
15 | +---
|
|
16 | + src/gallium/drivers/d3d12/d3d12_screen.cpp | 3 ++-
|
|
17 | + 1 file changed, 2 insertions(+), 1 deletion(-)
|
|
18 | + |
|
19 | +diff --git a/src/gallium/drivers/d3d12/d3d12_screen.cpp b/src/gallium/drivers/d3d12/d3d12_screen.cpp
|
|
20 | +index 7debc1f0c57..e9aca69819f 100644
|
|
21 | +--- a/src/gallium/drivers/d3d12/d3d12_screen.cpp
|
|
22 | ++++ b/src/gallium/drivers/d3d12/d3d12_screen.cpp
|
|
23 | +@@ -743,7 +743,8 @@ d3d12_destroy_screen(struct d3d12_screen *screen)
|
|
24 | + slab_destroy_parent(&screen->transfer_pool);
|
|
25 | + mtx_destroy(&screen->submit_mutex);
|
|
26 | + mtx_destroy(&screen->descriptor_pool_mutex);
|
|
27 | +- util_dl_close(screen->d3d12_mod);
|
|
28 | ++ if (screen->d3d12_mod)
|
|
29 | ++ util_dl_close(screen->d3d12_mod);
|
|
30 | + glsl_type_singleton_decref();
|
|
31 | + FREE(screen);
|
|
32 | + }
|
|
33 | +--
|
|
34 | +2.37.2
|
|
35 | + |
1 | +From b5133894005720db24a8e0cc17e047a291953ff4 Mon Sep 17 00:00:00 2001
|
|
2 | +From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
|
|
3 | +Date: Sun, 4 Dec 2022 00:21:45 +0000
|
|
4 | +Subject: [PATCH 2/2] dzn: Don't crash when libd3d12.so can't be found
|
|
5 | + |
|
6 | +`dzn_instance_create` will call `dzn_instance_destroy` when the d3d12
|
|
7 | +library fails to load. Just like the issue in `d3d12_screen`, this will
|
|
8 | +lead to a crash because `d3d12_mod` is NULL.
|
|
9 | + |
|
10 | +To fix this, only close the library after if it was actually opened.
|
|
11 | + |
|
12 | +Cc: mesa-stable
|
|
13 | +Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
|
|
14 | +Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20145>
|
|
15 | +---
|
|
16 | + src/microsoft/vulkan/dzn_device.c | 3 ++-
|
|
17 | + 1 file changed, 2 insertions(+), 1 deletion(-)
|
|
18 | + |
|
19 | +diff --git a/src/microsoft/vulkan/dzn_device.c b/src/microsoft/vulkan/dzn_device.c
|
|
20 | +index 16a5aca331f..8f9b5939eb8 100644
|
|
21 | +--- a/src/microsoft/vulkan/dzn_device.c
|
|
22 | ++++ b/src/microsoft/vulkan/dzn_device.c
|
|
23 | +@@ -174,7 +174,8 @@ dzn_instance_destroy(struct dzn_instance *instance, const VkAllocationCallbacks
|
|
24 | + if (instance->factory)
|
|
25 | + ID3D12DeviceFactory_Release(instance->factory);
|
|
26 | +
|
|
27 | +- util_dl_close(instance->d3d12_mod);
|
|
28 | ++ if (instance->d3d12_mod)
|
|
29 | ++ util_dl_close(instance->d3d12_mod);
|
|
30 | +
|
|
31 | + vk_instance_finish(&instance->vk);
|
|
32 | + vk_free2(vk_default_allocator(), alloc, instance);
|
|
33 | +--
|
|
34 | +2.37.2
|
|
35 | + |
1 | 1 | 07_gallium-fix-build-failure-on-powerpcspe.diff
|
2 | 2 | path_max.diff
|
3 | 3 | src_glx_dri_common.h.diff
|
4 | +0001-d3d12-Don-t-crash-when-libd3d12.so-can-t-be-found.patch
|
|
5 | +0002-dzn-Don-t-crash-when-libd3d12.so-can-t-be-found.patch |