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]
Message-ID: <dc37cf9d-ddaf-94c7-8fc1-460c8da59d7b@amd.com>
Date:   Thu, 28 May 2020 22:06:14 -0400
From:   Felix Kuehling <felix.kuehling@....com>
To:     Colin King <colin.king@...onical.com>,
        Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Mukul Joshi <mukul.joshi@....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][next] drm/amdkfd: fix a dereference of pdd before it is
 null checked

On 2020-05-28 18:24, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> Currently pointer pdd is being dereferenced when assigning pointer
> dpm and then pdd is being null checked.  Fix this by checking if
> pdd is null before the dereference of pdd occurs.
>
> Addresses-Coverity: ("Dereference before null check")
> Fixes: 522b89c63370 ("drm/amdkfd: Track SDMA utilization per process")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>

Reviewed-by: Felix Kuehling <Felix.Kuehling@....com>

I applied the patch to our internal amd-staging-drm-next.

Regards,
   Felix


> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_process.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> index 25636789f3d3..bdc58741b32e 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> @@ -103,10 +103,11 @@ static void kfd_sdma_activity_worker(struct work_struct *work)
>   		return;
>   
>   	pdd = workarea->pdd;
> +	if (!pdd)
> +		return;
>   	dqm = pdd->dev->dqm;
>   	qpd = &pdd->qpd;
> -
> -	if (!pdd || !dqm || !qpd)
> +	if (!dqm || !qpd)
>   		return;
>   
>   	mm = get_task_mm(pdd->process->lead_thread);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ