summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-10-22 17:38:42 +0200
committerNicolai Hähnle <[email protected]>2017-11-09 11:53:20 +0100
commitb650fc09c3a35ca624aad5fe4b5c34867708f116 (patch)
tree81a32b31057801dc1274d38489306205696e9f7d /src/gallium
parentdd7c273e873f20474e2af1959ab2928292020941 (diff)
radeonsi: fix potential use-after-free of debug callbacks
Found by inspection. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 7940fc8d5b2..7c50ffae6a3 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -158,6 +158,10 @@ static void si_set_debug_callback(struct pipe_context *ctx,
const struct pipe_debug_callback *cb)
{
struct si_context *sctx = (struct si_context *)ctx;
+ struct si_screen *screen = sctx->screen;
+
+ util_queue_finish(&screen->shader_compiler_queue);
+ util_queue_finish(&screen->shader_compiler_queue_low_priority);
if (cb)
sctx->debug = *cb;