diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-10-22 17:38:42 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-11-03 19:39:12 +0100 |
commit | e49a7e074850d151e8535dc342d72215f727ca89 (patch) | |
tree | 30802e5e26ca6d0839dab06a8804fbe0bfd526a7 | |
parent | 87abb9d8d87c8aff4ffff36cd93d2f213ae7d2d8 (diff) |
radeonsi: fix potential use-after-free of debug callbacks
Found by inspection.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 4 |
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 df4c92a79f..4b7c002837 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -166,6 +166,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; |