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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ec56556-299b-31e0-e639-b96e1666b215@amd.com>
Date:   Thu, 20 Aug 2020 09:16:42 +0200
From:   Christian König <christian.koenig@....com>
To:     Furquan Shaikh <furquan@...gle.com>,
        Harry Wentland <harry.wentland@....com>,
        Leo Li <sunpeng.li@....com>,
        Alex Deucher <alexander.deucher@....com>
Cc:     David Airlie <airlied@...ux.ie>, Daniel Vetter <daniel@...ll.ch>,
        Nicholas Kazlauskas <nicholas.kazlauskas@....com>,
        Bhawanpreet Lakha <Bhawanpreet.Lakha@....com>,
        Stylon Wang <stylon.wang@....com>, Roman Li <roman.li@....com>,
        Mikita Lipski <mikita.lipski@....com>,
        amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, adurbin@...gle.com,
        deepak.sharma@....com
Subject: Re: [PATCH] drivers: gpu: amd: Initialize amdgpu_dm_backlight_caps
 object to 0 in amdgpu_dm_update_backlight_caps

Am 20.08.20 um 07:26 schrieb Furquan Shaikh:
> In `amdgpu_dm_update_backlight_caps()`, there is a local
> `amdgpu_dm_backlight_caps` object that is filled in by
> `amdgpu_acpi_get_backlight_caps()`. However, this object is
> uninitialized before the call and hence the subsequent check for
> aux_support can fail since it is not initialized by
> `amdgpu_acpi_get_backlight_caps()` as well. This change initializes
> this local `amdgpu_dm_backlight_caps` object to 0.
>
> Signed-off-by: Furquan Shaikh <furquan@...gle.com>
> ---
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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 e4b33c67b634..725d8af634ee 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -2853,7 +2853,7 @@ static int amdgpu_dm_mode_config_init(struct amdgpu_device *adev)
>   static void amdgpu_dm_update_backlight_caps(struct amdgpu_display_manager *dm)
>   {
>   #if defined(CONFIG_ACPI)
> -	struct amdgpu_dm_backlight_caps caps;
> +	struct amdgpu_dm_backlight_caps caps = { 0 };

Please use memset instead of "{ 0 }" for initialization.

Christian.

>   
>   	if (dm->backlight_caps.caps_valid)
>   		return;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ