diff options
author | Ilia Mirkin <[email protected]> | 2018-12-26 22:58:54 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2018-12-30 19:44:43 -0500 |
commit | ef3eac954574d630593012369ba309210158b760 (patch) | |
tree | ff9dbf9cec5775021e51cbb71fef3b905db8db7a /src/gallium/drivers/nouveau | |
parent | ad1e59cf8d05f07db9f8d4183b3179cef230edfa (diff) |
nv30: avoid setting user_priv without setting cur_ctx
The whole user_priv thing is a mess, but as long as it's there, it
basically has to map 1:1 to the cur_ctx. Unfortunately we were setting
user_priv to some context, then that context could get deleted without
any draws/validations in it, leading user_priv to become NULL, with
cur_ctx still pointing at some old context. Then we wouldn't run the
switch logic, which in turn led to a NULL bufctx being dereferenced.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102349
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_context.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_context.c b/src/gallium/drivers/nouveau/nv30/nv30_context.c index e137525c2b8..853db925b73 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_context.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_context.c @@ -221,9 +221,7 @@ nv30_context_create(struct pipe_screen *pscreen, void *priv, unsigned ctxflags) /*XXX: *cough* per-context pushbufs */ push = screen->base.pushbuf; nv30->base.pushbuf = push; - nv30->base.pushbuf->user_priv = &nv30->bufctx; /* hack at validate time */ - nv30->base.pushbuf->rsvd_kick = 16; /* hack in screen before first space */ - nv30->base.pushbuf->kick_notify = nv30_context_kick_notify; + push->kick_notify = nv30_context_kick_notify; nv30->base.invalidate_resource_storage = nv30_invalidate_resource_storage; |