Re: [Intel-gfx] [PATCH] drm/i915/ttm: Fix access_memory null pointer exception

2022-10-14 Thread Andi Shyti
Hi Matt, On Fri, Oct 14, 2022 at 10:44:11AM +0100, Matthew Auld wrote: > On 14/10/2022 09:56, Andi Shyti wrote: > > On Fri, Oct 14, 2022 at 09:39:52AM +0100, Matthew Auld wrote: > > > On 13/10/2022 18:56, Jonathan Cavitt wrote: > > > > i915_ttm_to_gem can return a NULL pointer, which is > > > > de

Re: [Intel-gfx] [PATCH] drm/i915/ttm: Fix access_memory null pointer exception

2022-10-14 Thread Das, Nirmoy
On 10/14/2022 12:52 PM, Matthew Auld wrote: On 14/10/2022 11:38, Das, Nirmoy wrote: Hi Matt, On 10/14/2022 12:13 PM, Matthew Auld wrote: On 14/10/2022 10:27, Das, Nirmoy wrote: Hi Matt On 10/14/2022 10:39 AM, Matthew Auld wrote: On 13/10/2022 18:56, Jonathan Cavitt wrote: i915_ttm_to_gem

Re: [Intel-gfx] [PATCH] drm/i915/ttm: Fix access_memory null pointer exception

2022-10-14 Thread Matthew Auld
On 14/10/2022 11:38, Das, Nirmoy wrote: Hi Matt, On 10/14/2022 12:13 PM, Matthew Auld wrote: On 14/10/2022 10:27, Das, Nirmoy wrote: Hi Matt On 10/14/2022 10:39 AM, Matthew Auld wrote: On 13/10/2022 18:56, Jonathan Cavitt wrote: i915_ttm_to_gem can return a NULL pointer, which is dereferenc

Re: [Intel-gfx] [PATCH] drm/i915/ttm: Fix access_memory null pointer exception

2022-10-14 Thread Das, Nirmoy
Hi Matt, On 10/14/2022 12:13 PM, Matthew Auld wrote: On 14/10/2022 10:27, Das, Nirmoy wrote: Hi Matt On 10/14/2022 10:39 AM, Matthew Auld wrote: On 13/10/2022 18:56, Jonathan Cavitt wrote: i915_ttm_to_gem can return a NULL pointer, which is dereferenced in i915_ttm_access_memory without firs

Re: [Intel-gfx] [PATCH] drm/i915/ttm: Fix access_memory null pointer exception

2022-10-14 Thread Matthew Auld
On 14/10/2022 10:27, Das, Nirmoy wrote: Hi Matt On 10/14/2022 10:39 AM, Matthew Auld wrote: On 13/10/2022 18:56, Jonathan Cavitt wrote: i915_ttm_to_gem can return a NULL pointer, which is dereferenced in i915_ttm_access_memory without first checking if it is NULL.  Inspecting i915_ttm_io_mem_r

Re: [Intel-gfx] [PATCH] drm/i915/ttm: Fix access_memory null pointer exception

2022-10-14 Thread Tvrtko Ursulin
Hi, A couple nit picks for the benefit of coding style. On 13/10/2022 18:56, Jonathan Cavitt wrote: i915_ttm_to_gem can return a NULL pointer, which is dereferenced in i915_ttm_access_memory without first checking if it is NULL. Inspecting i915_ttm_io_mem_reserve, it appears the correct beha

Re: [Intel-gfx] [PATCH] drm/i915/ttm: Fix access_memory null pointer exception

2022-10-14 Thread Matthew Auld
On 14/10/2022 09:56, Andi Shyti wrote: On Fri, Oct 14, 2022 at 09:39:52AM +0100, Matthew Auld wrote: On 13/10/2022 18:56, Jonathan Cavitt wrote: i915_ttm_to_gem can return a NULL pointer, which is dereferenced in i915_ttm_access_memory without first checking if it is NULL. Inspecting i915_ttm_

Re: [Intel-gfx] [PATCH] drm/i915/ttm: Fix access_memory null pointer exception

2022-10-14 Thread Das, Nirmoy
Hi Matt On 10/14/2022 10:39 AM, Matthew Auld wrote: On 13/10/2022 18:56, Jonathan Cavitt wrote: i915_ttm_to_gem can return a NULL pointer, which is dereferenced in i915_ttm_access_memory without first checking if it is NULL.  Inspecting i915_ttm_io_mem_reserve, it appears the correct behavior i

Re: [Intel-gfx] [PATCH] drm/i915/ttm: Fix access_memory null pointer exception

2022-10-14 Thread Andrzej Hajda
On 13.10.2022 19:56, Jonathan Cavitt wrote: i915_ttm_to_gem can return a NULL pointer, which is dereferenced in i915_ttm_access_memory without first checking if it is NULL. Inspecting i915_ttm_io_mem_reserve, it appears the correct behavior in this case is to return -EINVAL. Fixes: 26b15eb0 ("d

Re: [Intel-gfx] [PATCH] drm/i915/ttm: Fix access_memory null pointer exception

2022-10-14 Thread Andi Shyti
On Fri, Oct 14, 2022 at 09:39:52AM +0100, Matthew Auld wrote: > On 13/10/2022 18:56, Jonathan Cavitt wrote: > > i915_ttm_to_gem can return a NULL pointer, which is > > dereferenced in i915_ttm_access_memory without first > > checking if it is NULL. Inspecting > > i915_ttm_io_mem_reserve, it appear

Re: [Intel-gfx] [PATCH] drm/i915/ttm: Fix access_memory null pointer exception

2022-10-14 Thread Andi Shyti
Hi Jonathan, On Thu, Oct 13, 2022 at 10:56:50AM -0700, Jonathan Cavitt wrote: > i915_ttm_to_gem can return a NULL pointer, which is > dereferenced in i915_ttm_access_memory without first > checking if it is NULL. Inspecting > i915_ttm_io_mem_reserve, it appears the correct > behavior in this case

Re: [Intel-gfx] [PATCH] drm/i915/ttm: Fix access_memory null pointer exception

2022-10-14 Thread Matthew Auld
On 13/10/2022 18:56, Jonathan Cavitt wrote: i915_ttm_to_gem can return a NULL pointer, which is dereferenced in i915_ttm_access_memory without first checking if it is NULL. Inspecting i915_ttm_io_mem_reserve, it appears the correct behavior in this case is to return -EINVAL. The GEM object has

[Intel-gfx] [PATCH] drm/i915/ttm: Fix access_memory null pointer exception

2022-10-13 Thread Jonathan Cavitt
i915_ttm_to_gem can return a NULL pointer, which is dereferenced in i915_ttm_access_memory without first checking if it is NULL. Inspecting i915_ttm_io_mem_reserve, it appears the correct behavior in this case is to return -EINVAL. Fixes: 26b15eb0 ("drm/i915/ttm: implement access_memory") Signed-