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: <a10755a4-a2dc-f0f2-7828-e2617c573116@quicinc.com>
Date:   Tue, 29 Mar 2022 13:55:27 -0700
From:   Abhinav Kumar <quic_abhinavk@...cinc.com>
To:     <cgel.zte@...il.com>, <robdclark@...il.com>
CC:     <sean@...rly.run>, <airlied@...ux.ie>, <daniel@...ll.ch>,
        <dmitry.baryshkov@...aro.org>, <bjorn.andersson@...aro.org>,
        <lv.ruyi@....com.cn>, <greenfoo@....eu>,
        <linux-arm-msm@...r.kernel.org>, <dri-devel@...ts.freedesktop.org>,
        <freedreno@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] drm: msm: add null pointer check

Seems to be a duplicate of

https://patchwork.freedesktop.org/patch/479378/

Thanks

Abhinav

On 3/29/2022 3:34 AM, cgel.zte@...il.com wrote:
> From: Lv Ruyi <lv.ruyi@....com.cn>
> 
> kzalloc is a memory allocation function which can return NULL when some
> internal memory errors happen. Add null pointer check to avoid
> dereferencing null pointer.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Lv Ruyi <lv.ruyi@....com.cn>
> ---
>   drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
> index 5d2ff6791058..acfe1b31e079 100644
> --- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
> +++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
> @@ -176,6 +176,8 @@ void msm_disp_snapshot_add_block(struct msm_disp_state *disp_state, u32 len,
>   	va_list va;
>   
>   	new_blk = kzalloc(sizeof(struct msm_disp_state_block), GFP_KERNEL);
> +	if (!new_blk)
> +		return;
>   
>   	va_start(va, fmt);
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ