diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2023-10-23 01:33:54 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2023-10-23 01:33:54 -0500 |
commit | 49279914573cacbf595dab63aa989164a5021294 (patch) | |
tree | 1984735ec0a417fdec077be6fce0924bf6c19011 | |
parent | 14d7da24640dadfb55769cfc93e13ab653996fed (diff) |
nouveau: Avoid NULL deref of pushbuf on flushamber
The fix in f911daf1 is incomplete for nouveau; PUSH_KICK is called before
the DrawBuffer check, which causes a similar traceback:
PUSH_KICK (push=0x0)
nouveau_flush
_mesa_make_current
_mesa_free_context_data
nouveau_context_deinit
nv10_context_destroy
nouveau_context_destroy
driDestroyContext
dri2_destroy_context
glXDestroyContext
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10030
Fixes: f911daf16d2 ("dri: avoid NULL deref of DrawBuffer on flush")
Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25848>
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_driver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.c b/src/mesa/drivers/dri/nouveau/nouveau_driver.c index f242eb557e9..16ea90701d9 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_driver.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.c @@ -69,7 +69,7 @@ nouveau_flush(struct gl_context *ctx, unsigned gallium_flush_flags) struct nouveau_context *nctx = to_nouveau_context(ctx); struct nouveau_pushbuf *push = context_push(ctx); - PUSH_KICK(push); + if (push) PUSH_KICK(push); if (ctx->DrawBuffer && _mesa_is_winsys_fbo(ctx->DrawBuffer) && ctx->DrawBuffer->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT) { |