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] [day] [month] [year] [list]
Date:   Sat, 11 Apr 2020 00:42:54 -0400
From:   Andrey Grodzovsky <Andrey.Grodzovsky@....com>
To:     Colin King <colin.king@...onical.com>,
        Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        David Zhou <David1.Zhou@....com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        John Clements <john.clements@....com>,
        amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/amdgpu: ensure device_list is initialised before
 calling list_add_tail


On 4/10/20 6:57 PM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> Currently the call to list_add_tail will access an the uninitalised
> device_list.prev. Fix this by ensuring device_list is initialized before
> adding items to it.
>
> Addresses-Coverity: ("Uninitialized pointer read")


That weird, I see that his is already initialized unconditionally here - 
https://elixir.bootlin.com/linux/v5.6.3/source/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c#L4022

Andrey


> Fixes: b3dbd6d3ec49 ("drm/amdgpu: resolve mGPU RAS query instability")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index b0aa4e1ed4df..caa4969bd46f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -1447,6 +1447,7 @@ static void amdgpu_ras_do_recovery(struct work_struct *work)
>   	if  (hive && adev->gmc.xgmi.num_physical_nodes > 1) {
>   		device_list_handle = &hive->device_list;
>   	} else {
> +		INIT_LIST_HEAD(&device_list);
>   		list_add_tail(&adev->gmc.xgmi.head, &device_list);
>   		device_list_handle = &device_list;
>   	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ