Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] Fixes KW issue for NULL pointer dereference
@ 2022-08-11 13:11 Tapas Rana
  2022-08-11 13:45 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Tapas Rana @ 2022-08-11 13:11 UTC (permalink / raw)
  To: intel-gfx; +Cc: Tapas Rana

- adds a NULL pointer check for the input parameter

Signed-off-by: Tapas Rana <tapas.rana@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
index 9a7e50534b84..de7c892aabc5 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
@@ -435,6 +435,9 @@ i915_ttm_memcpy_work_arm(struct i915_ttm_memcpy_work *work,
 static bool i915_ttm_memcpy_allowed(struct ttm_buffer_object *bo,
 				    struct ttm_resource *dst_mem)
 {
+	if (!bo)
+		return false;
+	
 	if (i915_gem_object_needs_ccs_pages(i915_ttm_to_gem(bo)))
 		return false;
 
-- 
2.25.1


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

end of thread, other threads:[~2022-08-11 23:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-11 13:11 [Intel-gfx] [PATCH] Fixes KW issue for NULL pointer dereference Tapas Rana
2022-08-11 13:45 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-08-11 14:06 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-08-11 15:35 ` [Intel-gfx] [PATCH] " Jani Nikula
2022-08-11 23:28 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox