gallium/pipebuffer: fix multithread issue on pb_slab_manager_create_buffer

This is an issue found in testing multiple mediafoundation MFT
concurrently.  Thanks to Jesse for the fix.

cc: mesa-stable

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36923>
(cherry picked from commit e76e95e084)
This commit is contained in:
Pohsiang (John) Hsu 2025-08-21 17:23:11 -07:00 committed by Eric Engestrom
parent 215521c03b
commit 76724bd376
2 changed files with 2 additions and 2 deletions

View file

@ -1884,7 +1884,7 @@
"description": "gallium/pipebuffer: fix multithread issue on pb_slab_manager_create_buffer",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -369,7 +369,7 @@ pb_slab_manager_create_buffer(struct pb_manager *_mgr,
const struct pb_desc *desc)
{
struct pb_slab_manager *mgr = pb_slab_manager(_mgr);
static struct pb_slab_buffer *buf;
struct pb_slab_buffer *buf;
struct pb_slab *slab;
struct list_head *list;