All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: Russell King <linux+etnaviv@armlinux.org.uk>,
	Christian Gmeiner <christian.gmeiner@gmail.com>,
	David Airlie <airlied@linux.ie>,
	Wei Yongjun <weiyongjun1@huawei.com>,
	etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/etnaviv: fix missing unlock on error in etnaviv_gpu_submit()
Date: Wed, 12 Apr 2017 11:53:10 +0200	[thread overview]
Message-ID: <1491990790.2270.56.camel@pengutronix.de> (raw)
In-Reply-To: <20170412003116.30767-1-weiyj.lk@gmail.com>

Am Mittwoch, den 12.04.2017, 00:31 +0000 schrieb Wei Yongjun:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Add the missing unlock before return from function etnaviv_gpu_submit()
> in the error handling case.
> 
> Fixes: f3cd1b064f11 ("drm/etnaviv: (re-)protect fence allocation with
> GPU mutex")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> index da48819..e4a4d4c 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> @@ -1317,7 +1317,7 @@ int etnaviv_gpu_submit(struct etnaviv_gpu *gpu,
>  	if (!fence) {
>  		event_free(gpu, event);
>  		ret = -ENOMEM;
> -		goto out_pm_put;
> +		goto out_unlok;

Label should probably be named "out_unlock". Fixed up while applying,
thanks.

Regards,
Lucas

>  	}
>  
>  	gpu->event[event].fence = fence;
> @@ -1357,6 +1357,7 @@ int etnaviv_gpu_submit(struct etnaviv_gpu *gpu,
>  	hangcheck_timer_reset(gpu);
>  	ret = 0;
>  
> +out_unlok:
>  	mutex_unlock(&gpu->lock);
>  
>  out_pm_put:
> 

WARNING: multiple messages have this Message-ID (diff)
From: Lucas Stach <l.stach@pengutronix.de>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org,
	Wei Yongjun <weiyongjun1@huawei.com>,
	Russell King <linux+etnaviv@armlinux.org.uk>
Subject: Re: [PATCH] drm/etnaviv: fix missing unlock on error in etnaviv_gpu_submit()
Date: Wed, 12 Apr 2017 11:53:10 +0200	[thread overview]
Message-ID: <1491990790.2270.56.camel@pengutronix.de> (raw)
In-Reply-To: <20170412003116.30767-1-weiyj.lk@gmail.com>

Am Mittwoch, den 12.04.2017, 00:31 +0000 schrieb Wei Yongjun:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Add the missing unlock before return from function etnaviv_gpu_submit()
> in the error handling case.
> 
> Fixes: f3cd1b064f11 ("drm/etnaviv: (re-)protect fence allocation with
> GPU mutex")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> index da48819..e4a4d4c 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> @@ -1317,7 +1317,7 @@ int etnaviv_gpu_submit(struct etnaviv_gpu *gpu,
>  	if (!fence) {
>  		event_free(gpu, event);
>  		ret = -ENOMEM;
> -		goto out_pm_put;
> +		goto out_unlok;

Label should probably be named "out_unlock". Fixed up while applying,
thanks.

Regards,
Lucas

>  	}
>  
>  	gpu->event[event].fence = fence;
> @@ -1357,6 +1357,7 @@ int etnaviv_gpu_submit(struct etnaviv_gpu *gpu,
>  	hangcheck_timer_reset(gpu);
>  	ret = 0;
>  
> +out_unlok:
>  	mutex_unlock(&gpu->lock);
>  
>  out_pm_put:
> 


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-04-12  9:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-12  0:31 [PATCH] drm/etnaviv: fix missing unlock on error in etnaviv_gpu_submit() Wei Yongjun
2017-04-12  9:53 ` Lucas Stach [this message]
2017-04-12  9:53   ` Lucas Stach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1491990790.2270.56.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=airlied@linux.ie \
    --cc=christian.gmeiner@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=etnaviv@lists.freedesktop.org \
    --cc=linux+etnaviv@armlinux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=weiyj.lk@gmail.com \
    --cc=weiyongjun1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.