RE: [PATCH] drm/amdgpu: Handle potential NULL pointer dereference

2022-08-26 Thread Russell, Kent
[AMD Official Use Only - General] > -Original Message- > From: Ghannam, Yazen > Sent: Friday, August 26, 2022 11:20 AM > To: Russell, Kent > Cc: Lazar, Lijo ; amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH] drm/amdgpu: Handle potential NULL pointer dereference &

Re: [PATCH] drm/amdgpu: Handle potential NULL pointer dereference

2022-08-26 Thread Yazen Ghannam
On Thu, Aug 25, 2022 at 08:54:46AM -0400, Russell, Kent wrote: > [AMD Official Use Only - General] > > It does indeed short-circuit on || (If the left side of an || statement is > not 0, it doesn't evaluate the right side and returns true). So we can ignore > this patch, since checking for each

RE: [PATCH] drm/amdgpu: Handle potential NULL pointer dereference

2022-08-25 Thread Russell, Kent
en Subject: RE: [PATCH] drm/amdgpu: Handle potential NULL pointer dereference [AMD Official Use Only - General] Good point, as if (1 || 0) should short-circuit at the if (1) part. Thus we should go down to NOTIFY_DONE if m is NULL. Yazen can confirm here, as he was the one who with me when we fou

RE: [PATCH] drm/amdgpu: Handle potential NULL pointer dereference

2022-08-25 Thread Russell, Kent
34 AM To: Russell, Kent ; amd-gfx@lists.freedesktop.org Cc: Ghannam, Yazen Subject: Re: [PATCH] drm/amdgpu: Handle potential NULL pointer dereference On 8/25/2022 5:16 PM, Russell, Kent wrote: > [AMD Official Use Only - General] > > Friendly ping > Wonder how it goes any further wh

Re: [PATCH] drm/amdgpu: Handle potential NULL pointer dereference

2022-08-25 Thread Lazar, Lijo
- From: Russell, Kent Sent: Monday, August 15, 2022 11:31 AM To: amd-gfx@lists.freedesktop.org Cc: Ghannam, Yazen ; Russell, Kent Subject: [PATCH] drm/amdgpu: Handle potential NULL pointer dereference If m is NULL, we will end up referencing a NULL pointer in the subsequent m elements like extcpu

RE: [PATCH] drm/amdgpu: Handle potential NULL pointer dereference

2022-08-25 Thread Russell, Kent
[AMD Official Use Only - General] Friendly ping Kent -Original Message- From: Russell, Kent Sent: Monday, August 15, 2022 11:31 AM To: amd-gfx@lists.freedesktop.org Cc: Ghannam, Yazen ; Russell, Kent Subject: [PATCH] drm/amdgpu: Handle potential NULL pointer dereference If m is

[PATCH] drm/amdgpu: Handle potential NULL pointer dereference

2022-08-15 Thread Kent Russell
If m is NULL, we will end up referencing a NULL pointer in the subsequent m elements like extcpu, bank and status. Pull the NULL check out and do it first before referencing m's elements. Signed-off-by: Kent Russell --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 - 1 file changed, 4 inserti