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]
Message-ID: <bc0b8b71-507d-c6c2-9029-359c7f27daf4@suse.de>
Date:   Thu, 13 May 2021 15:08:17 +0200
From:   Thomas Zimmermann <tzimmermann@...e.de>
To:     Zou Wei <zou_wei@...wei.com>, maarten.lankhorst@...ux.intel.com,
        mripard@...nel.org, airlied@...ux.ie, daniel@...ll.ch
Cc:     dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] drm/aperture: Fix missing unlock on error in
 devm_aperture_acquire()

Hi

Am 13.05.21 um 10:46 schrieb Zou Wei:
> Add the missing unlock before return from function devm_aperture_acquire()
> in the error handling case.
> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Zou Wei <zou_wei@...wei.com>

I added a Fixes tag and queued up the patch for drm-misc-next. Thanks!

Best regards
Thomas

> ---
>   drivers/gpu/drm/drm_aperture.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_aperture.c b/drivers/gpu/drm/drm_aperture.c
> index 33bf018..9335d9d 100644
> --- a/drivers/gpu/drm/drm_aperture.c
> +++ b/drivers/gpu/drm/drm_aperture.c
> @@ -164,13 +164,17 @@ static int devm_aperture_acquire(struct drm_device *dev,
>   
>   	list_for_each(pos, &drm_apertures) {
>   		ap = container_of(pos, struct drm_aperture, lh);
> -		if (overlap(base, end, ap->base, ap->base + ap->size))
> +		if (overlap(base, end, ap->base, ap->base + ap->size)) {
> +			mutex_unlock(&drm_apertures_lock);
>   			return -EBUSY;
> +		}
>   	}
>   
>   	ap = devm_kzalloc(dev->dev, sizeof(*ap), GFP_KERNEL);
> -	if (!ap)
> +	if (!ap) {
> +		mutex_unlock(&drm_apertures_lock);
>   		return -ENOMEM;
> +	}
>   
>   	ap->dev = dev;
>   	ap->base = base;
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer



Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ