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: <82ff7880-f323-b208-b52b-90bd568af934@amd.com>
Date:   Wed, 27 Sep 2023 07:23:44 +0200
From:   Christian König <christian.koenig@....com>
To:     Harry Wentland <harry.wentland@....com>,
        Cong Liu <liucong2@...inos.cn>, Leo Li <sunpeng.li@....com>,
        Rodrigo Siqueira <Rodrigo.Siqueira@....com>,
        Alex Deucher <alexander.deucher@....com>,
        "Pan, Xinhui" <Xinhui.Pan@....com>,
        David Airlie <airlied@...il.com>,
        Daniel Vetter <daniel@...ll.ch>,
        Aurabindo Pillai <aurabindo.pillai@....com>,
        Tom Chung <chiahsuan.chung@....com>
Cc:     amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] drm/amd/display: Fix null pointer dereference in
 error message

Am 26.09.23 um 15:09 schrieb Harry Wentland:
>
> On 2023-09-26 01:56, Cong Liu wrote:
>> This patch fixes a null pointer dereference in the error message that is
>> printed when the Display Core (DC) fails to initialize. The original
>> message includes the DC version number, which is undefined if the DC is
>> not initialized.
>>
>> Fixes: 9788d087caff ("drm/amd/display: improve the message printed when loading DC")
>> Signed-off-by: Cong Liu <liucong2@...inos.cn>
>> ---
>>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> index 8e98dda1e084..bf52a909f558 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> @@ -1703,8 +1703,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
>>   		DRM_INFO("Display Core v%s initialized on %s\n", DC_VER,
>>   			 dce_version_to_string(adev->dm.dc->ctx->dce_version));
>>   	} else {
>> -		DRM_INFO("Display Core v%s failed to initialize on %s\n", DC_VER,
>> -			 dce_version_to_string(adev->dm.dc->ctx->dce_version));
>> +		DRM_INFO("Display Core failed to initialize with v%s!\n", DC_VER);
> There is value in printing the version number. Let's not remove it.
>
> Instead you can probably fix it by doing a NULL check on adev->dm.dc->ctx.

But as far as I understand it adev->dm.dc->ctx will always be NULL in 
this case.

Regards,
Christian.

>
> Harry
>
>>   		goto error;
>>   	}
>>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ