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] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa46cad1-8845-78b7-eb6a-45942813020b@amd.com>
Date:   Wed, 23 Oct 2019 13:35:09 +0000
From:   Harry Wentland <hwentlan@....com>
To:     zhongshiqi <zhong.shiqi@....com.cn>,
        "Wentland, Harry" <Harry.Wentland@....com>
CC:     "Li, Sun peng (Leo)" <Sunpeng.Li@....com>,
        "Deucher, Alexander" <Alexander.Deucher@....com>,
        "Koenig, Christian" <Christian.Koenig@....com>,
        "Zhou, David(ChunMing)" <David1.Zhou@....com>,
        "airlied@...ux.ie" <airlied@...ux.ie>,
        "daniel@...ll.ch" <daniel@...ll.ch>,
        "Lakha, Bhawanpreet" <Bhawanpreet.Lakha@....com>,
        "Lei, Jun" <Jun.Lei@....com>,
        "David.Francis@....com" <David.Francis@....com>,
        "Laktyushkin, Dmytro" <Dmytro.Laktyushkin@....com>,
        "Koo, Anthony" <Anthony.Koo@....com>,
        "Liu, Wenjing" <Wenjing.Liu@....com>,
        "Kazlauskas, Nicholas" <Nicholas.Kazlauskas@....com>,
        "Aidan.Wood@....com" <Aidan.Wood@....com>,
        "Park, Chris" <Chris.Park@....com>,
        "Yang, Eric" <Eric.Yang2@....com>,
        "amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "xue.zhihong@....com.cn" <xue.zhihong@....com.cn>,
        "wang.yi59@....com.cn" <wang.yi59@....com.cn>,
        "cheng.shengyu@....com.cn" <cheng.shengyu@....com.cn>
Subject: Re: [PATCH] dc.c:use kzalloc without test

On 2019-10-23 4:32 a.m., zhongshiqi wrote:
> dc.c:583:null check is needed after using kzalloc function
> 
> Signed-off-by: zhongshiqi <zhong.shiqi@....com.cn>

Reviewed-by: Harry Wentland <harry.wentland@....com>

Harry

> ---
>  drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index 5d1aded..4b8819c 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -580,6 +580,10 @@ static bool construct(struct dc *dc,
>  #ifdef CONFIG_DRM_AMD_DC_DCN2_0
>  	// Allocate memory for the vm_helper
>  	dc->vm_helper = kzalloc(sizeof(struct vm_helper), GFP_KERNEL);
> +	if (!dc->vm_helper) {
> +		dm_error("%s: failed to create dc->vm_helper\n", __func__);
> +		goto fail;
> +	}
>  
>  #endif
>  	memcpy(&dc->bb_overrides, &init_params->bb_overrides, sizeof(dc->bb_overrides));
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ