unlocks were incorrectly added to paths using dri2_egl_display() as
well as those using dri2_egl_display_lock()
pthread_mutex_unlock() when unlocked is documented by posix as
being undefined behaviour. On OpenBSD pthread_mutex_unlock() will call
abort(3) if this happens.
Fixes:
f1efe037dfd ("egl/dri2: Add display lock")
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20712>
(cherry picked from commit
0594b3c143d48c5f37f705abb03f18fbbabbc6b0)
"description": "egl/dri2: avoid undefined unlocks",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "f1efe037dfd82d95b025a3ddf58b669758b8d69a"
},
if (dri2_dpy->vtbl->get_sync_values)
ret = dri2_dpy->vtbl->get_sync_values(disp, surf, ust, msc, sbc);
- mtx_unlock(&dri2_dpy->lock);
-
return ret;
}
ret = dri2_dpy->vtbl->query_surface(disp, surf, attribute, value);
}
- mtx_unlock(&dri2_dpy->lock);
-
return ret;
}