From 76724bd3767b23a321db9a35c876e4855ca74da9 Mon Sep 17 00:00:00 2001 From: "Pohsiang (John) Hsu" Date: Thu, 21 Aug 2025 17:23:11 -0700 Subject: [PATCH] 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 Reviewed-by: Sil Vilerino Reviewed-by: Jesse Natalie Part-of: (cherry picked from commit e76e95e084f4bc1d4ddbe8a38d86df7d14e619dd) --- .pick_status.json | 2 +- src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 9da88c7d301..835f599271c 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c index 7496a804d0b..3e8536bd4c0 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c @@ -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;