lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 02 Sep 2019 12:50:44 +0200
From:   Lucas Stach <l.stach@...gutronix.de>
To:     Wei Yongjun <weiyongjun1@...wei.com>,
        Russell King <linux+etnaviv@...linux.org.uk>,
        Christian Gmeiner <christian.gmeiner@...il.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>
Cc:     etnaviv@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH -next] drm/etnaviv: fix missing unlock on error in
 etnaviv_iommuv1_context_alloc()

On Mo, 2019-08-19 at 06:17 +0000, Wei Yongjun wrote:
> Add the missing unlock before return from function
> etnaviv_iommuv1_context_alloc()
> in the error handling case.
> 
> Fixes: 27b67278e007 ("drm/etnaviv: rework MMU handling")
> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>

Thanks, applied.

For my education, can you tell me which tool you did use to catch this
issue?

Regards,
Lucas

> ---
>  drivers/gpu/drm/etnaviv/etnaviv_iommu.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_iommu.c
> b/drivers/gpu/drm/etnaviv/etnaviv_iommu.c
> index aac8dbf3ea56..1a7c89a67bea 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_iommu.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_iommu.c
> @@ -140,8 +140,10 @@ etnaviv_iommuv1_context_alloc(struct
> etnaviv_iommu_global *global)
>  	}
>  
>  	v1_context = kzalloc(sizeof(*v1_context), GFP_KERNEL);
> -	if (!v1_context)
> +	if (!v1_context) {
> +		mutex_unlock(&global->lock);
>  		return NULL;
> +	}
>  
>  	v1_context->pgtable_cpu = dma_alloc_wc(global->dev, PT_SIZE,
>  					       &v1_context-
> >pgtable_dma,
> 
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ