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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <61149e02-ad4c-6e3d-e33b-b21025aa3b65@gmail.com>
Date:   Mon, 23 May 2022 09:58:59 +0800
From:   Hangyu Hua <hbh25y@...il.com>
To:     robdclark@...il.com, sean@...rly.run, quic_abhinavk@...cinc.com,
        airlied@...ux.ie, daniel@...ll.ch, dmitry.baryshkov@...aro.org,
        gbeeresh@...eaurora.org, sviau@...eaurora.org,
        wentaox@...eaurora.org
Cc:     linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        freedreno@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm: msm: fix possible memory leak in
 mdp5_crtc_cursor_set()

On 2022/5/9 14:11, Hangyu Hua wrote:
> drm_gem_object_lookup will call drm_gem_object_get inside. So cursor_bo
> needs to be put when msm_gem_get_and_pin_iova fails.
> 
> Fixes: e172d10a9c4a ("drm/msm/mdp5: Add hardware cursor support")
> Signed-off-by: Hangyu Hua <hbh25y@...il.com>
> ---
>   drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
> index b966cd69f99d..6a5f73f6a23b 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
> @@ -991,8 +991,10 @@ static int mdp5_crtc_cursor_set(struct drm_crtc *crtc,
>   
>   	ret = msm_gem_get_and_pin_iova(cursor_bo, kms->aspace,
>   			&mdp5_crtc->cursor.iova);
> -	if (ret)
> +	if (ret) {
> +		drm_gem_object_put(cursor_bo);
>   		return -EINVAL;
> +	}
>   
>   	pm_runtime_get_sync(&pdev->dev);
>   

Gentel ping.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ