rbug: Fix rbug_delete_vs_state lock acquisition.

Fix warning reported by Coverity Scan.

Double unlock (LOCK)
double_unlock: mtx_unlock unlocks rb_pipe->call_mutex while it is
unlocked.

Fixes: 07838ff990 ("rbug: Use the call mutex")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3023
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5196>
(cherry picked from commit c0c03f4772)
This commit is contained in:
Vinson Lee 2020-05-24 15:40:39 -07:00 committed by Eric Engestrom
parent 74c85ceabe
commit 2474d3ecc4
2 changed files with 2 additions and 2 deletions

View file

@ -3262,7 +3262,7 @@
"description": "rbug: Fix rbug_delete_vs_state lock acquisition.",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "07838ff990a74e3acd95de7042042b49ecc51570"
},

View file

@ -490,7 +490,7 @@ rbug_delete_vs_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct rbug_shader *rb_shader = rbug_shader(_vs);
mtx_unlock(&rb_pipe->call_mutex);
mtx_lock(&rb_pipe->call_mutex);
rbug_shader_destroy(rb_pipe, rb_shader);
mtx_unlock(&rb_pipe->call_mutex);
}