[Mesa-dev] [PATCH] winsys/amdgpu: avoid double simple_mtx_unlock()

Marek Olšák maraeo at gmail.com
Thu Nov 28 20:08:19 UTC 2019


Pushed, thanks!

Marek

On Thu, Nov 28, 2019 at 12:56 AM Jonathan Gray <jsg at jsg.id.au> wrote:

> 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.
>
> This occurs in amdgpu_winsys_create() after
> cb446dc0fa5c68f681108f4613560543aa4cf553
> winsys/amdgpu: Add amdgpu_screen_winsys
>
> Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
> Cc: 19.2 19.3 <mesa-stable at lists.freedesktop.org>
> ---
>  src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
> b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
> index a89432d8594..2fe227c9213 100644
> --- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
> +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
> @@ -326,7 +326,6 @@ amdgpu_winsys_create(int fd, const struct
> pipe_screen_config *config,
>     aws = util_hash_table_get(dev_tab, dev);
>     if (aws) {
>        pipe_reference(NULL, &aws->reference);
> -      simple_mtx_unlock(&dev_tab_mutex);
>
>        /* Release the device handle, because we don't need it anymore.
>         * This function is returning an existing winsys instance, which
> --
> 2.24.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20191128/8f92400a/attachment.html>


More information about the mesa-dev mailing list