Re: [Intel-gfx] [PATCH] drm/i915/gt: Prevent error pointer dereference

2023-09-13 Thread Andi Shyti
Hi Dan, On Wed, Sep 13, 2023 at 11:17:41AM +0300, Dan Carpenter wrote: > Move the check for "if (IS_ERR(obj))" in front of the call to > i915_gem_object_set_cache_coherency() which dereferences "obj". > Otherwise it will lead to a crash. > > Fixes: 43aa755eae2c ("drm/i915/mtl: Update cache

[Intel-gfx] [PATCH] drm/i915/gt: Prevent error pointer dereference

2023-09-13 Thread Dan Carpenter
Move the check for "if (IS_ERR(obj))" in front of the call to i915_gem_object_set_cache_coherency() which dereferences "obj". Otherwise it will lead to a crash. Fixes: 43aa755eae2c ("drm/i915/mtl: Update cache coherency setting for context structure") Signed-off-by: Dan Carpenter ---