All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] Fix NULL pointer found by static analysis
@ 2020-09-23  4:40 Steve Hampson
  2020-09-23  5:28 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Steve Hampson @ 2020-09-23  4:40 UTC (permalink / raw)
  To: intel-gfx

A static analysis tool has reveiled a NULL pointer error in
__i915_gem_object_lock.  This appears to be correct as many calls
pass a NULL into the ww parameter.

Signed-off-by: Steve Hampson <steven.t.hampson@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_object.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.h b/drivers/gpu/drm/i915/gem/i915_gem_object.h
index d46db8d8f38e..9b18ead42991 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h
@@ -126,7 +126,7 @@ static inline int __i915_gem_object_lock(struct drm_i915_gem_object *obj,
 	if (ret == -EALREADY)
 		ret = 0;
 
-	if (ret == -EDEADLK)
+	if (ret == -EDEADLK && ww)
 		ww->contended = obj;
 
 	return ret;
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-09-24  1:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-23  4:40 [Intel-gfx] [PATCH] Fix NULL pointer found by static analysis Steve Hampson
2020-09-23  5:28 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-09-23  8:48 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-09-23  8:58 ` [Intel-gfx] [PATCH] " Chris Wilson
2020-09-23  9:04   ` Jani Nikula
2020-09-23 21:23 ` Hampson, Steven T
2020-09-23 21:57 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Fix NULL pointer found by static analysis (rev2) Patchwork
2020-09-23 22:22 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-09-24  1:08 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.